summaryrefslogtreecommitdiff
path: root/src/jit/rationalize.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/jit/rationalize.cpp')
-rw-r--r--src/jit/rationalize.cpp40
1 files changed, 11 insertions, 29 deletions
diff --git a/src/jit/rationalize.cpp b/src/jit/rationalize.cpp
index 1cdb54f214..d51634b6db 100644
--- a/src/jit/rationalize.cpp
+++ b/src/jit/rationalize.cpp
@@ -552,7 +552,7 @@ void Rationalizer::RewriteAddress(LIR::Use& use)
JITDUMP("\n");
}
-Compiler::fgWalkResult Rationalizer::RewriteNode(GenTree** useEdge, ArrayStack<GenTree*>& parentStack)
+Compiler::fgWalkResult Rationalizer::RewriteNode(GenTree** useEdge, Compiler::GenTreeStack& parentStack)
{
assert(useEdge != nullptr);
@@ -755,39 +755,21 @@ Compiler::fgWalkResult Rationalizer::RewriteNode(GenTree** useEdge, ArrayStack<G
assert(comp->IsTargetIntrinsic(node->gtIntrinsic.gtIntrinsicId));
break;
-#ifdef FEATURE_SIMD
case GT_BLK:
+ // We should only see GT_BLK for TYP_STRUCT.
+ assert(node->TypeGet() == TYP_STRUCT);
+ break;
+
case GT_OBJ:
- {
- // TODO-1stClassStructs: These should have been transformed to GT_INDs, but in order
- // to preserve existing behavior, we will keep this as a block node if this is the
- // lhs of a block assignment, and either:
- // - It is a "generic" TYP_STRUCT assignment, OR
- // - It is an initblk, OR
- // - Neither the lhs or rhs are known to be of SIMD type.
-
- GenTree* parent = use.User();
- bool keepBlk = false;
- if ((parent->OperGet() == GT_ASG) && (node == parent->gtGetOp1()))
+ assert(node->TypeGet() == TYP_STRUCT || !use.User()->OperIsInitBlkOp());
+ if (varTypeIsSIMD(node))
{
- if ((node->TypeGet() == TYP_STRUCT) || parent->OperIsInitBlkOp())
- {
- keepBlk = true;
- }
- else if (!comp->isAddrOfSIMDType(node->AsBlk()->Addr()))
- {
- GenTree* dataSrc = parent->gtGetOp2();
- if (!dataSrc->IsLocal() && (dataSrc->OperGet() != GT_SIMD) && (!dataSrc->OperIsHWIntrinsic()))
- {
- noway_assert(dataSrc->OperIsIndir());
- keepBlk = !comp->isAddrOfSIMDType(dataSrc->AsIndir()->Addr());
- }
- }
+ // Rewrite these as GT_IND.
+ RewriteSIMDOperand(use, false);
}
- RewriteSIMDOperand(use, keepBlk);
- }
- break;
+ break;
+#ifdef FEATURE_SIMD
case GT_SIMD:
{
noway_assert(comp->featureSIMD);