From 01ce41954e5efa8d2de5bb9d7a0934197090a610 Mon Sep 17 00:00:00 2001 From: Carol Eidt Date: Tue, 7 Nov 2017 17:42:55 -0800 Subject: ARMARCH: no cascaded adds in addr mode On ARM and ARM64, cascaded `ADD`s in the op2 position of the root ADD are not folded into a single addressing mode. However, in `gtSetEvalOrder` it assumes that they will, so it walks both operands of the addr looking for more `ADD`s. This leads to an assert because the leaf nodes it winds up with are not the same as those returned by `genCreateAddrMode()`. Fix #14665 --- src/jit/codegencommon.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/jit/codegencommon.cpp') diff --git a/src/jit/codegencommon.cpp b/src/jit/codegencommon.cpp index 41ce431e28..d3ba991a6a 100644 --- a/src/jit/codegencommon.cpp +++ b/src/jit/codegencommon.cpp @@ -2018,7 +2018,7 @@ AGAIN: } #endif // LEGACY_BACKEND -#if defined(_TARGET_ARM64_) || (defined(_TARGET_ARM_) && !defined(LEGACY_BACKEND)) +#if defined(_TARGET_ARMARCH_) && !defined(LEGACY_BACKEND) if (cns == 0) #endif { @@ -2038,7 +2038,7 @@ AGAIN: goto AGAIN; -#if SCALED_ADDR_MODES && !defined(_TARGET_ARM64_) && !(defined(_TARGET_ARM_) && !defined(LEGACY_BACKEND)) +#if SCALED_ADDR_MODES && (!defined(_TARGET_ARMARCH_) || defined(LEGACY_BACKEND)) // TODO-ARM64-CQ, TODO-ARM-CQ: For now we don't try to create a scaled index. case GT_MUL: if (op1->gtOverflow()) @@ -2103,7 +2103,7 @@ AGAIN: switch (op1->gtOper) { -#if !defined(_TARGET_ARM64_) && !(defined(_TARGET_ARM_) && !defined(LEGACY_BACKEND)) +#if !defined(_TARGET_ARMARCH_) || defined(LEGACY_BACKEND) // TODO-ARM64-CQ, TODO-ARM-CQ: For now we don't try to create a scaled index. case GT_ADD: @@ -2165,7 +2165,7 @@ AGAIN: break; #endif // SCALED_ADDR_MODES -#endif // !_TARGET_ARM64_ && !(_TARGET_ARM_ && !LEGACY_BACKEND) +#endif // !_TARGET_ARMARCH || LEGACY_BACKEND case GT_NOP: @@ -2194,7 +2194,7 @@ AGAIN: noway_assert(op2); switch (op2->gtOper) { -#if !defined(_TARGET_ARM64_) && !(defined(_TARGET_ARM_) && !defined(LEGACY_BACKEND)) +#if !defined(_TARGET_ARMARCH_) || defined(LEGACY_BACKEND) // TODO-ARM64-CQ, TODO-ARM-CQ: For now we don't try to create a scaled index. case GT_ADD: @@ -2252,7 +2252,7 @@ AGAIN: break; #endif // SCALED_ADDR_MODES -#endif // !_TARGET_ARM64_ && !(_TARGET_ARM_ && !LEGACY_BACKEND) +#endif // !_TARGET_ARMARCH || LEGACY_BACKEND case GT_NOP: -- cgit v1.2.3