[PATCH] D47981: [InstCombine] Fold (x >> y) << y -> x & (-1 << y)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 10 09:32:29 PDT 2018


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

LGTM.



================
Comment at: lib/Transforms/InstCombine/InstCombineShifts.cpp:608
     unsigned BitWidth = I.getType()->getScalarSizeInBits();
     Type *Ty = I.getType();
 
----------------
Remove the duplicate/shadow variable.


Repository:
  rL LLVM

https://reviews.llvm.org/D47981





More information about the llvm-commits mailing list