[PATCH] D69125: [InstCombine] dropRedundantMaskingOfLeftShiftInput(): truncation (PR42563)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 4 06:32:39 PST 2019


spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp:196
   if (match(Masked, m_c_And(m_CombineOr(MaskA, MaskB), m_Value(X)))) {
+    match(MaskShAmt, m_ZExtOrSelf(m_Value(MaskShAmt)));
+
----------------
This match construct is unusual enough (not inside an 'if' statement and not testing the return value some other way) that I'd put a comment on it like:
  // Peek through an optional zext of the shift amount.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69125





More information about the llvm-commits mailing list