[llvm] r369546 - Add a couple of extra test noticed in post-commit discussion of rL369541
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 21 09:57:53 PDT 2019
Author: reames
Date: Wed Aug 21 09:57:53 2019
New Revision: 369546
URL: http://llvm.org/viewvc/llvm-project?rev=369546&view=rev
Log:
Add a couple of extra test noticed in post-commit discussion of rL369541
Modified:
llvm/trunk/test/Transforms/InstCombine/icmp-sub.ll
Modified: llvm/trunk/test/Transforms/InstCombine/icmp-sub.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/icmp-sub.ll?rev=369546&r1=369545&r2=369546&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/icmp-sub.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/icmp-sub.ll Wed Aug 21 09:57:53 2019
@@ -124,3 +124,22 @@ define i1 @test_sub_127_Y_eq_127(i8 %y)
%z = icmp eq i8 %s, 127
ret i1 %z
}
+
+define i1 @test_sub_255_Y_eq_255(i8 %y) {
+; CHECK-LABEL: @test_sub_255_Y_eq_255(
+; CHECK-NEXT: [[Z:%.*]] = icmp eq i8 [[Y:%.*]], 0
+; CHECK-NEXT: ret i1 [[Z]]
+;
+ %s = sub i8 255, %y
+ %z = icmp eq i8 %s, 255
+ ret i1 %z
+}
+define <2 x i1> @test_sub_255_Y_eq_255_vec(<2 x i8> %y) {
+; CHECK-LABEL: @test_sub_255_Y_eq_255_vec(
+; CHECK-NEXT: [[Z:%.*]] = icmp eq <2 x i8> [[Y:%.*]], zeroinitializer
+; CHECK-NEXT: ret <2 x i1> [[Z]]
+;
+ %s = sub <2 x i8> <i8 255, i8 255>, %y
+ %z = icmp eq <2 x i8> %s, <i8 255, i8 255>
+ ret <2 x i1> %z
+}
More information about the llvm-commits
mailing list