[PATCH] D33879: [InstCombine] fold lshr (sext X), C1 --> zext (lshr X, C2)

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 7 11:18:28 PDT 2017


efriedma 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);
----------------
This isn't calling shouldChangeType; is that intentional?  (Not sure how much this matters.)


https://reviews.llvm.org/D33879





More information about the llvm-commits mailing list