diff options
Diffstat (limited to 'test/Transforms/InstSimplify/gep.ll')
-rw-r--r-- | test/Transforms/InstSimplify/gep.ll | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/Transforms/InstSimplify/gep.ll b/test/Transforms/InstSimplify/gep.ll index 49a97f1..13640e7 100644 --- a/test/Transforms/InstSimplify/gep.ll +++ b/test/Transforms/InstSimplify/gep.ll @@ -9,7 +9,7 @@ define %struct.A* @test1(%struct.A* %b, %struct.A* %e) { %b_ptr = ptrtoint %struct.A* %b to i64 %sub = sub i64 %e_ptr, %b_ptr %sdiv = sdiv exact i64 %sub, 7 - %gep = getelementptr inbounds %struct.A* %b, i64 %sdiv + %gep = getelementptr inbounds %struct.A, %struct.A* %b, i64 %sdiv ret %struct.A* %gep ; CHECK-LABEL: @test1 ; CHECK-NEXT: ret %struct.A* %e @@ -19,7 +19,7 @@ define i8* @test2(i8* %b, i8* %e) { %e_ptr = ptrtoint i8* %e to i64 %b_ptr = ptrtoint i8* %b to i64 %sub = sub i64 %e_ptr, %b_ptr - %gep = getelementptr inbounds i8* %b, i64 %sub + %gep = getelementptr inbounds i8, i8* %b, i64 %sub ret i8* %gep ; CHECK-LABEL: @test2 ; CHECK-NEXT: ret i8* %e @@ -30,7 +30,7 @@ define i64* @test3(i64* %b, i64* %e) { %b_ptr = ptrtoint i64* %b to i64 %sub = sub i64 %e_ptr, %b_ptr %ashr = ashr exact i64 %sub, 3 - %gep = getelementptr inbounds i64* %b, i64 %ashr + %gep = getelementptr inbounds i64, i64* %b, i64 %ashr ret i64* %gep ; CHECK-LABEL: @test3 ; CHECK-NEXT: ret i64* %e @@ -40,7 +40,7 @@ define %struct.A* @test4(%struct.A* %b) { %b_ptr = ptrtoint %struct.A* %b to i64 %sub = sub i64 0, %b_ptr %sdiv = sdiv exact i64 %sub, 7 - %gep = getelementptr inbounds %struct.A* %b, i64 %sdiv + %gep = getelementptr inbounds %struct.A, %struct.A* %b, i64 %sdiv ret %struct.A* %gep ; CHECK-LABEL: @test4 ; CHECK-NEXT: ret %struct.A* null @@ -49,7 +49,7 @@ define %struct.A* @test4(%struct.A* %b) { define i8* @test5(i8* %b) { %b_ptr = ptrtoint i8* %b to i64 %sub = sub i64 0, %b_ptr - %gep = getelementptr inbounds i8* %b, i64 %sub + %gep = getelementptr inbounds i8, i8* %b, i64 %sub ret i8* %gep ; CHECK-LABEL: @test5 ; CHECK-NEXT: ret i8* null @@ -59,7 +59,7 @@ define i64* @test6(i64* %b) { %b_ptr = ptrtoint i64* %b to i64 %sub = sub i64 0, %b_ptr %ashr = ashr exact i64 %sub, 3 - %gep = getelementptr inbounds i64* %b, i64 %ashr + %gep = getelementptr inbounds i64, i64* %b, i64 %ashr ret i64* %gep ; CHECK-LABEL: @test6 ; CHECK-NEXT: ret i64* null @@ -69,7 +69,7 @@ define i8* @test7(i8* %b, i8** %e) { %e_ptr = ptrtoint i8** %e to i64 %b_ptr = ptrtoint i8* %b to i64 %sub = sub i64 %e_ptr, %b_ptr - %gep = getelementptr inbounds i8* %b, i64 %sub + %gep = getelementptr inbounds i8, i8* %b, i64 %sub ret i8* %gep ; CHECK-LABEL: @test7 ; CHECK-NEXT: ptrtoint |