Fix pr25040 - Handle vectors of i1s in recently added implication code
[oota-llvm.git] / test / Transforms / InstSimplify / implies.ll
index 19e61930d755816ae804ef9bb88d1a5454d3987a..80b6ac810d08eb59677cbf9e289e2faada54fa42 100644 (file)
@@ -75,3 +75,19 @@ define i1 @test4(i32 %length.i, i32 %i) {
   %res = icmp ule i1 %var30, %var29
   ret i1 %res
 }
+
+; A ==> A for vectors
+define <4 x i1> @test5(<4 x i1> %vec) {
+; CHECK-LABEL: @test5
+; CHECK: ret <4 x i1> <i1 true, i1 true, i1 true, i1 true>
+  %res = icmp ule <4 x i1> %vec, %vec
+  ret <4 x i1> %res
+}
+
+; Don't crash on vector inputs - pr25040
+define <4 x i1> @test6(<4 x i1> %a, <4 x i1> %b) {
+; CHECK-LABEL: @test6
+; CHECK: ret <4 x i1> %res
+  %res = icmp ule <4 x i1> %a, %b
+  ret <4 x i1> %res
+}