[PATCH] D64517: [InstCombine] Dropping redundant masking before left-shift [2/5] (PR42563)

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 12 14:29:31 PDT 2019


lebedev.ri marked an inline comment as done.
lebedev.ri added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp:121
+    // FIXME: could also rely on ConstantRange.
+    if (!match(ShAmtsDiff, m_NonNegative()))
+      return nullptr;
----------------
It may be possible to use `SimplifyICmpInst()` here,
we also could ask it about `ShiftShAmt u>= MaskShAmt`
May look into that after patchset.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64517/new/

https://reviews.llvm.org/D64517





More information about the llvm-commits mailing list