[PATCH] D24700: [InstCombine] optimize unsigned icmp of increment

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 26 12:11:43 PDT 2016


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

lgtm with nits


================
Comment at: test/Transforms/InstCombine/icmp.ll:2765
@@ +2764,3 @@
+
+define i1 @icmp_add1_ugt(i32 %x, i32 %y) {
+; CHECK-LABEL: @icmp_add1_ugt(
----------------
Add one or two negative checks.

================
Comment at: test/Transforms/InstCombine/icmp.ll:2799
@@ +2798,3 @@
+; CHECK-LABEL: @cmp_ult_rhs_inc(
+; CHECK-NEXT:    [[CONV:%.*]] = fptosi float %x to i32
+; CHECK-NEXT:    [[CMP:%.*]] = icmp ule i32 [[CONV]], %i
----------------
I'd drop the `fptosi` unless you need it for some reason -- it is distracting.


https://reviews.llvm.org/D24700





More information about the llvm-commits mailing list