[PATCH] D67725: [InstCombine] dropRedundantMaskingOfLeftShiftInput(): pat. c/d/e with mask (PR42563)

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 23 09:34:07 PDT 2019


lebedev.ri added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp:207
+      // This sub-fold (with mask) is invalid for 'ashr' "masking" instruction.
+      if (cast<Instruction>(Masked)->isArithmeticShift())
+        return nullptr;
----------------
spatel wrote:
> Did we ensure that Masked is not a ConstantExpr? If so, add an assert that Masked must be an Instruction here or somewhere above here?
*sigh*


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67725





More information about the llvm-commits mailing list