[PATCH] D12210: [InstCombine] Transform A & (L - 1) u< L --> L != 0

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 20 14:18:40 PDT 2015


majnemer added inline comments.

================
Comment at: lib/Transforms/InstCombine/InstCombineCompares.cpp:3503
@@ +3502,3 @@
+          I.getPredicate() == ICmpInst::ICMP_ULT) {
+        auto *Zero = ConstantInt::getNullValue(BO0->getType());
+        return new ICmpInst(ICmpInst::ICMP_NE, L, Zero);
----------------
I'd use `Constant::` instead of `ConstantInt::` to make it a little more clear.  It is possible to get back a vector constant.


http://reviews.llvm.org/D12210





More information about the llvm-commits mailing list