diff --git a/test/Transforms/InstCombine/apint-shift.ll b/test/Transforms/InstCombine/apint-shift.ll index 398ca37e243..01d83f35af3 100644 --- a/test/Transforms/InstCombine/apint-shift.ll +++ b/test/Transforms/InstCombine/apint-shift.ll @@ -205,6 +205,7 @@ define i1 @test16(i84 %X) { ret i1 %cmp } +; FIXME: Vectors should fold too. define <2 x i1> @test16vec(<2 x i84> %X) { ; CHECK-LABEL: @test16vec( ; CHECK-NEXT: [[SHR1:%.*]] = lshr <2 x i84> %X, @@ -229,6 +230,18 @@ define i1 @test17(i106 %A) { ret i1 %C } +; FIXME: Vectors should fold too. +define <2 x i1> @test17vec(<2 x i106> %A) { +; CHECK-LABEL: @test17vec( +; CHECK-NEXT: [[B:%.*]] = lshr <2 x i106> %A, +; CHECK-NEXT: [[C:%.*]] = icmp eq <2 x i106> [[B]], +; CHECK-NEXT: ret <2 x i1> [[C]] +; + %B = lshr <2 x i106> %A, + %C = icmp eq <2 x i106> %B, + ret <2 x i1> %C +} + define i1 @test18(i11 %A) { ; CHECK-LABEL: @test18( ; CHECK-NEXT: ret i1 false @@ -248,6 +261,18 @@ define i1 @test19(i37 %A) { ret i1 %C } +; FIXME: Vectors should fold too. +define <2 x i1> @test19vec(<2 x i37> %A) { +; CHECK-LABEL: @test19vec( +; CHECK-NEXT: [[B:%.*]] = ashr <2 x i37> %A, +; CHECK-NEXT: [[C:%.*]] = icmp eq <2 x i37> [[B]], zeroinitializer +; CHECK-NEXT: ret <2 x i1> [[C]] +; + %B = ashr <2 x i37> %A, + %C = icmp eq <2 x i37> %B, zeroinitializer + ret <2 x i1> %C +} + define i1 @test19a(i39 %A) { ; CHECK-LABEL: @test19a( ; CHECK-NEXT: [[C:%.*]] = icmp ugt i39 %A, -5 @@ -258,6 +283,18 @@ define i1 @test19a(i39 %A) { ret i1 %C } +; FIXME: Vectors should fold too. +define <2 x i1> @test19a_vec(<2 x i39> %A) { +; CHECK-LABEL: @test19a_vec( +; CHECK-NEXT: [[B:%.*]] = ashr <2 x i39> %A, +; CHECK-NEXT: [[C:%.*]] = icmp eq <2 x i39> [[B]], +; CHECK-NEXT: ret <2 x i1> [[C]] +; + %B = ashr <2 x i39> %A, + %C = icmp eq <2 x i39> %B, + ret <2 x i1> %C +} + define i1 @test20(i13 %A) { ; CHECK-LABEL: @test20( ; CHECK-NEXT: ret i1 false