Skip to content

Commit

Permalink
Clear GTF_IND_ASG_LHS after Rationalize for STORE_OBJ/BLK.
Browse files Browse the repository at this point in the history
We were doing this for `STOREIND`, but forgetting for `STORE_OBJ/BLK`.
  • Loading branch information
Sergey Andreenko committed Jun 25, 2020
1 parent eefeb7e commit ef2709d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/coreclr/src/jit/rationalize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -700,10 +700,14 @@ Compiler::fgWalkResult Rationalizer::RewriteNode(GenTree** useEdge, Compiler::Ge
case GT_BLK:
// We should only see GT_BLK for TYP_STRUCT or for InitBlocks.
assert((node->TypeGet() == TYP_STRUCT) || use.User()->OperIsInitBlkOp());
// Clear the `GTF_IND_ASG_LHS` flag, which overlaps with `GTF_IND_REQ_ADDR_IN_REG`.
node->gtFlags &= ~GTF_IND_ASG_LHS;
break;

case GT_OBJ:
assert((node->TypeGet() == TYP_STRUCT) || !use.User()->OperIsInitBlkOp());
// Clear the `GTF_IND_ASG_LHS` flag, which overlaps with `GTF_IND_REQ_ADDR_IN_REG`.
node->gtFlags &= ~GTF_IND_ASG_LHS;
if (varTypeIsSIMD(node->TypeGet()))
{
node->SetOper(GT_IND);
Expand Down

0 comments on commit ef2709d

Please sign in to comment.