Commit 89304433 authored by Junliang Yan's avatar Junliang Yan Committed by Commit Bot

PPC/s390: [turbofan] Initial Word64 support in representation selection.

Port 6346cdb6

Original Commit Message:

    This adds support to TurboFan's representation selection for the Word64
    representation, and makes use of that to handle indices for memory access
    and allocation instructions (i.e. LoadElement, StoreElement, Allocate,
    etc.). These instructions had previously used Word32 as representation
    for the indices / sizes, and then internally converted it to the correct
    representation (aka Word64 on 64-bit architectures) later on, but that
    was kind of brittle, and sometimes led to weird generated code.

    The change thus only adds support to convert integer values in the safe
    integer range from all kinds of representations to Word64 (on 64-bit
    architectures). We don't yet handle the opposite direction and none of
    the representation selection heuristics for the numeric operations were
    changed so far. This will be done in follow-up CLs.

    This CL itself is supposed to be neutral wrt. functionality, and only
    serves as a starting point, and a cleanup for the (weird) implicit
    Word64 index/size handling.

R=bmeurer@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: Ic7ea30639dea3c5f8a59e7100a15d5ed50073c20
Reviewed-on: https://chromium-review.googlesource.com/1228416Reviewed-by: 's avatarJoran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#55970}
parent 62b4e8e6
......@@ -1188,6 +1188,10 @@ void InstructionSelector::VisitChangeUint32ToUint64(Node* node) {
void InstructionSelector::VisitChangeFloat64ToUint64(Node* node) {
VisitRR(this, kPPC_DoubleToUint64, node);
}
void InstructionSelector::VisitChangeFloat64ToInt64(Node* node) {
VisitRR(this, kPPC_DoubleToInt64, node);
}
#endif
......
......@@ -1409,8 +1409,11 @@ static inline bool TryMatchDoubleConstructFromInsert(
FLOAT_UNARY_OP_LIST_32(V) \
V(Float64, ChangeFloat64ToUint64, kS390_DoubleToUint64, OperandMode::kNone, \
null) \
V(Float64, ChangeFloat64ToInt64, kS390_DoubleToInt64, OperandMode::kNone, \
null) \
V(Float64, BitcastFloat64ToInt64, kS390_BitcastDoubleToInt64, \
OperandMode::kNone, null)
#define WORD32_UNARY_OP_LIST(V) \
WORD32_UNARY_OP_LIST_32(V) \
V(Word32, ChangeInt32ToInt64, kS390_SignExtendWord32ToInt64, \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment