[PATCH] D63382: [InstCombine] fold a shifted zext to a select

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 14 17:37:28 PDT 2019


spatel marked an inline comment as done.
spatel added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp:936
         ConstantInt::get(Ty, APInt::getSignMask(BitWidth)), X);
 
+  // shl (zext (i1 X)), C1 --> select (X, 1 << C1, 0)
----------------
xbolva00 wrote:
> Not guarded by if (match(Op1, m_Constant(C1))) {
> 
> ?
Yikes - yes, that would do it...copy/pasted in the wrong spot.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D63382





More information about the llvm-commits mailing list