diff options
Diffstat (limited to 'llvm/test/Transforms/InstCombine/getelementptr.ll')
-rw-r--r-- | llvm/test/Transforms/InstCombine/getelementptr.ll | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/llvm/test/Transforms/InstCombine/getelementptr.ll b/llvm/test/Transforms/InstCombine/getelementptr.ll index 7446734e210..a3c2beb7eb2 100644 --- a/llvm/test/Transforms/InstCombine/getelementptr.ll +++ b/llvm/test/Transforms/InstCombine/getelementptr.ll @@ -177,9 +177,10 @@ define i1 @test13(i64 %X, %S* %P) { define <2 x i1> @test13_vector(<2 x i64> %X, <2 x %S*> %P) nounwind { ; CHECK-LABEL: @test13_vector( -; CHECK-NEXT: shl nuw <2 x i64> %X, <i64 2, i64 2> -; CHECK-NEXT: add <2 x i64> %A.idx, <i64 4, i64 4> -; CHECK-NEXT: icmp eq <2 x i64> %A.offs, zeroinitializer +; CHECK-NEXT: [[A_IDX:%.*]] = shl nuw <2 x i64> %X, <i64 2, i64 2> +; CHECK-NEXT: [[C:%.*]] = icmp eq <2 x i64> [[A_IDX]], <i64 -4, i64 -4> +; CHECK-NEXT: ret <2 x i1> [[C]] +; %A = getelementptr inbounds %S, <2 x %S*> %P, <2 x i64> zeroinitializer, <2 x i32> <i32 1, i32 1>, <2 x i64> %X %B = getelementptr inbounds %S, <2 x %S*> %P, <2 x i64> <i64 0, i64 0>, <2 x i32> <i32 0, i32 0> %C = icmp eq <2 x i32*> %A, %B @@ -198,10 +199,10 @@ define i1 @test13_as1(i16 %X, %S addrspace(1)* %P) { define <2 x i1> @test13_vector_as1(<2 x i16> %X, <2 x %S addrspace(1)*> %P) { ; CHECK-LABEL: @test13_vector_as1( -; CHECK-NEXT: shl nuw <2 x i16> %X, <i16 2, i16 2> -; CHECK-NEXT: add <2 x i16> %A.idx, <i16 4, i16 4> -; CHECK-NEXT: icmp eq <2 x i16> %A.offs, zeroinitializer -; CHECK-NEXT: ret <2 x i1> +; CHECK-NEXT: [[A_IDX:%.*]] = shl nuw <2 x i16> %X, <i16 2, i16 2> +; CHECK-NEXT: [[C:%.*]] = icmp eq <2 x i16> [[A_IDX]], <i16 -4, i16 -4> +; CHECK-NEXT: ret <2 x i1> [[C]] +; %A = getelementptr inbounds %S, <2 x %S addrspace(1)*> %P, <2 x i16> <i16 0, i16 0>, <2 x i32> <i32 1, i32 1>, <2 x i16> %X %B = getelementptr inbounds %S, <2 x %S addrspace(1)*> %P, <2 x i16> <i16 0, i16 0>, <2 x i32> <i32 0, i32 0> %C = icmp eq <2 x i32 addrspace(1)*> %A, %B |