[PATCH] D20036: [InstCombine] Fold icmp eq/ne (udiv i32 CI2, A), 0 -> icmp ugt/ule A, CI2

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Fri May 6 16:23:50 PDT 2016


majnemer added inline comments.

================
Comment at: lib/Transforms/InstCombine/InstCombineCompares.cpp:1549
@@ +1548,3 @@
+    return new ICmpInst(Pred, A,
+                        ConstantInt::get(A->getType(), CI2->getValue()));
+  }
----------------
Why do you need to do this `ConstantInt::get` call? Shouldn't `A` and `CI2` have the same type?


http://reviews.llvm.org/D20036





More information about the llvm-commits mailing list