Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update lower.cpp
  • Loading branch information
EgorBo authored Nov 5, 2021
commit d6f463d8474f1715b913d98e1963f7058359afee
10 changes: 0 additions & 10 deletions src/coreclr/jit/lower.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5754,16 +5754,6 @@ void Lowering::LowerShift(GenTreeOp* shift)
}
ContainCheckShiftRotate(shift);

// Fold any kind of shift by zero, e.g. LSH(X, 0) => X
LIR::Use use;
if (shift->gtGetOp2()->IsIntegralConst(0) && BlockRange().TryGetUse(shift, &use))
{
use.ReplaceWith(shift->gtGetOp1());
BlockRange().Remove(shift->gtGetOp2());
BlockRange().Remove(shift);
return;
}

#ifdef TARGET_ARM64
// Try to recognize ubfiz/sbfiz idiom in LSH(CAST(X), CNS) tree
if (comp->opts.OptimizationEnabled() && shift->OperIs(GT_LSH) && shift->gtGetOp1()->OperIs(GT_CAST) &&
Expand Down