[PATCH] D33879: [InstCombine] fold lshr (sext X), C1 --> zext (lshr X, C2)
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 7 11:27:09 PDT 2017
spatel added inline comments.
================
Comment at: lib/Transforms/InstCombine/InstCombineShifts.cpp:693
+ if (Op0->hasOneUse()) {
+ Value *NewLShr = Builder->CreateLShr(X, SrcTyBitWidth - 1);
+ return new ZExtInst(NewLShr, Ty);
----------------
efriedma wrote:
> This isn't calling shouldChangeType; is that intentional? (Not sure how much this matters.)
No, that's an oversight. I'll add that and a test case.
https://reviews.llvm.org/D33879
More information about the llvm-commits
mailing list