Skip to content

Commit 392153a

Browse files
Delete dead code from fgMorphSmpOp
The conditions tested constitute invalid IR.
1 parent 26a0c5d commit 392153a

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

src/coreclr/jit/morph.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11985,12 +11985,6 @@ GenTree* Compiler::fgMorphSmpOp(GenTree* tree, MorphAddrContext* mac)
1198511985

1198611986
effectiveOp1 = op1->gtEffectiveVal();
1198711987

11988-
if (effectiveOp1->OperIsConst())
11989-
{
11990-
op1 = gtNewOperNode(GT_IND, tree->TypeGet(), op1);
11991-
tree->AsOp()->gtOp1 = op1;
11992-
}
11993-
1199411988
// If we are storing a small type, we might be able to omit a cast.
1199511989
if (effectiveOp1->OperIs(GT_IND) && varTypeIsSmall(effectiveOp1))
1199611990
{
@@ -13068,15 +13062,6 @@ GenTree* Compiler::fgMorphSmpOp(GenTree* tree, MorphAddrContext* mac)
1306813062

1306913063
return addr;
1307013064
}
13071-
else if (op1->gtOper == GT_CAST)
13072-
{
13073-
GenTree* casting = op1->AsCast()->CastOp();
13074-
if (casting->gtOper == GT_LCL_VAR || casting->gtOper == GT_CLS_VAR)
13075-
{
13076-
DEBUG_DESTROY_NODE(op1);
13077-
tree->AsOp()->gtOp1 = op1 = casting;
13078-
}
13079-
}
1308013065
else if ((op1->gtOper == GT_COMMA) && !optValnumCSE_phase)
1308113066
{
1308213067
// Perform the transform ADDR(COMMA(x, ..., z)) == COMMA(x, ..., ADDR(z)).

0 commit comments

Comments
 (0)