aboutsummaryrefslogtreecommitdiffstats
path: root/test/Analysis/BasicAA/gep-alias.ll
diff options
context:
space:
mode:
authorPirama Arumuga Nainar <pirama@google.com>2015-04-08 08:55:49 -0700
committerPirama Arumuga Nainar <pirama@google.com>2015-04-09 15:04:38 -0700
commit4c5e43da7792f75567b693105cc53e3f1992ad98 (patch)
tree1b2c9792582e12f5af0b1512e3094425f0dc0df9 /test/Analysis/BasicAA/gep-alias.ll
parentc75239e6119d0f9a74c57099d91cbc9bde56bf33 (diff)
downloadexternal_llvm-4c5e43da7792f75567b693105cc53e3f1992ad98.zip
external_llvm-4c5e43da7792f75567b693105cc53e3f1992ad98.tar.gz
external_llvm-4c5e43da7792f75567b693105cc53e3f1992ad98.tar.bz2
Update aosp/master llvm for rebase to r233350
Change-Id: I07d935f8793ee8ec6b7da003f6483046594bca49
Diffstat (limited to 'test/Analysis/BasicAA/gep-alias.ll')
-rw-r--r--test/Analysis/BasicAA/gep-alias.ll110
1 files changed, 55 insertions, 55 deletions
diff --git a/test/Analysis/BasicAA/gep-alias.ll b/test/Analysis/BasicAA/gep-alias.ll
index 2c0d467..f686010 100644
--- a/test/Analysis/BasicAA/gep-alias.ll
+++ b/test/Analysis/BasicAA/gep-alias.ll
@@ -6,12 +6,12 @@ target datalayout = "e-p:32:32:32-p1:16:16:16-i1:8:8-i8:8:8-i16:16:16-i32:32:32-
define i32 @test1(i8 * %P) {
entry:
%Q = bitcast i8* %P to {i32, i32}*
- %R = getelementptr {i32, i32}* %Q, i32 0, i32 1
- %S = load i32* %R
+ %R = getelementptr {i32, i32}, {i32, i32}* %Q, i32 0, i32 1
+ %S = load i32, i32* %R
%q = bitcast i8* %P to {i32, i32}*
- %r = getelementptr {i32, i32}* %q, i32 0, i32 1
- %s = load i32* %r
+ %r = getelementptr {i32, i32}, {i32, i32}* %q, i32 0, i32 1
+ %s = load i32, i32* %r
%t = sub i32 %S, %s
ret i32 %t
@@ -22,13 +22,13 @@ entry:
define i32 @test2(i8 * %P) {
entry:
%Q = bitcast i8* %P to {i32, i32, i32}*
- %R = getelementptr {i32, i32, i32}* %Q, i32 0, i32 1
- %S = load i32* %R
+ %R = getelementptr {i32, i32, i32}, {i32, i32, i32}* %Q, i32 0, i32 1
+ %S = load i32, i32* %R
- %r = getelementptr {i32, i32, i32}* %Q, i32 0, i32 2
+ %r = getelementptr {i32, i32, i32}, {i32, i32, i32}* %Q, i32 0, i32 2
store i32 42, i32* %r
- %s = load i32* %R
+ %s = load i32, i32* %R
%t = sub i32 %S, %s
ret i32 %t
@@ -40,14 +40,14 @@ entry:
; This was a miscompilation.
define i32 @test3({float, {i32, i32, i32}}* %P) {
entry:
- %P2 = getelementptr {float, {i32, i32, i32}}* %P, i32 0, i32 1
- %R = getelementptr {i32, i32, i32}* %P2, i32 0, i32 1
- %S = load i32* %R
+ %P2 = getelementptr {float, {i32, i32, i32}}, {float, {i32, i32, i32}}* %P, i32 0, i32 1
+ %R = getelementptr {i32, i32, i32}, {i32, i32, i32}* %P2, i32 0, i32 1
+ %S = load i32, i32* %R
- %r = getelementptr {i32, i32, i32}* %P2, i32 0, i32 2
+ %r = getelementptr {i32, i32, i32}, {i32, i32, i32}* %P2, i32 0, i32 2
store i32 42, i32* %r
- %s = load i32* %R
+ %s = load i32, i32* %R
%t = sub i32 %S, %s
ret i32 %t
@@ -62,11 +62,11 @@ entry:
define i32 @test4(%SmallPtrSet64* %P) {
entry:
- %tmp2 = getelementptr inbounds %SmallPtrSet64* %P, i64 0, i32 0, i32 1
+ %tmp2 = getelementptr inbounds %SmallPtrSet64, %SmallPtrSet64* %P, i64 0, i32 0, i32 1
store i32 64, i32* %tmp2, align 8
- %tmp3 = getelementptr inbounds %SmallPtrSet64* %P, i64 0, i32 0, i32 4, i64 64
+ %tmp3 = getelementptr inbounds %SmallPtrSet64, %SmallPtrSet64* %P, i64 0, i32 0, i32 4, i64 64
store i8* null, i8** %tmp3, align 8
- %tmp4 = load i32* %tmp2, align 8
+ %tmp4 = load i32, i32* %tmp2, align 8
ret i32 %tmp4
; CHECK-LABEL: @test4(
; CHECK: ret i32 64
@@ -74,12 +74,12 @@ entry:
; P[i] != p[i+1]
define i32 @test5(i32* %p, i64 %i) {
- %pi = getelementptr i32* %p, i64 %i
+ %pi = getelementptr i32, i32* %p, i64 %i
%i.next = add i64 %i, 1
- %pi.next = getelementptr i32* %p, i64 %i.next
- %x = load i32* %pi
+ %pi.next = getelementptr i32, i32* %p, i64 %i.next
+ %x = load i32, i32* %pi
store i32 42, i32* %pi.next
- %y = load i32* %pi
+ %y = load i32, i32* %pi
%z = sub i32 %x, %y
ret i32 %z
; CHECK-LABEL: @test5(
@@ -87,12 +87,12 @@ define i32 @test5(i32* %p, i64 %i) {
}
define i32 @test5_as1_smaller_size(i32 addrspace(1)* %p, i8 %i) {
- %pi = getelementptr i32 addrspace(1)* %p, i8 %i
+ %pi = getelementptr i32, i32 addrspace(1)* %p, i8 %i
%i.next = add i8 %i, 1
- %pi.next = getelementptr i32 addrspace(1)* %p, i8 %i.next
- %x = load i32 addrspace(1)* %pi
+ %pi.next = getelementptr i32, i32 addrspace(1)* %p, i8 %i.next
+ %x = load i32, i32 addrspace(1)* %pi
store i32 42, i32 addrspace(1)* %pi.next
- %y = load i32 addrspace(1)* %pi
+ %y = load i32, i32 addrspace(1)* %pi
%z = sub i32 %x, %y
ret i32 %z
; CHECK-LABEL: @test5_as1_smaller_size(
@@ -101,12 +101,12 @@ define i32 @test5_as1_smaller_size(i32 addrspace(1)* %p, i8 %i) {
}
define i32 @test5_as1_same_size(i32 addrspace(1)* %p, i16 %i) {
- %pi = getelementptr i32 addrspace(1)* %p, i16 %i
+ %pi = getelementptr i32, i32 addrspace(1)* %p, i16 %i
%i.next = add i16 %i, 1
- %pi.next = getelementptr i32 addrspace(1)* %p, i16 %i.next
- %x = load i32 addrspace(1)* %pi
+ %pi.next = getelementptr i32, i32 addrspace(1)* %p, i16 %i.next
+ %x = load i32, i32 addrspace(1)* %pi
store i32 42, i32 addrspace(1)* %pi.next
- %y = load i32 addrspace(1)* %pi
+ %y = load i32, i32 addrspace(1)* %pi
%z = sub i32 %x, %y
ret i32 %z
; CHECK-LABEL: @test5_as1_same_size(
@@ -116,12 +116,12 @@ define i32 @test5_as1_same_size(i32 addrspace(1)* %p, i16 %i) {
; P[i] != p[(i*4)|1]
define i32 @test6(i32* %p, i64 %i1) {
%i = shl i64 %i1, 2
- %pi = getelementptr i32* %p, i64 %i
+ %pi = getelementptr i32, i32* %p, i64 %i
%i.next = or i64 %i, 1
- %pi.next = getelementptr i32* %p, i64 %i.next
- %x = load i32* %pi
+ %pi.next = getelementptr i32, i32* %p, i64 %i.next
+ %x = load i32, i32* %pi
store i32 42, i32* %pi.next
- %y = load i32* %pi
+ %y = load i32, i32* %pi
%z = sub i32 %x, %y
ret i32 %z
; CHECK-LABEL: @test6(
@@ -130,12 +130,12 @@ define i32 @test6(i32* %p, i64 %i1) {
; P[1] != P[i*4]
define i32 @test7(i32* %p, i64 %i) {
- %pi = getelementptr i32* %p, i64 1
+ %pi = getelementptr i32, i32* %p, i64 1
%i.next = shl i64 %i, 2
- %pi.next = getelementptr i32* %p, i64 %i.next
- %x = load i32* %pi
+ %pi.next = getelementptr i32, i32* %p, i64 %i.next
+ %x = load i32, i32* %pi
store i32 42, i32* %pi.next
- %y = load i32* %pi
+ %y = load i32, i32* %pi
%z = sub i32 %x, %y
ret i32 %z
; CHECK-LABEL: @test7(
@@ -146,13 +146,13 @@ define i32 @test7(i32* %p, i64 %i) {
; PR1143
define i32 @test8(i32* %p, i16 %i) {
%i1 = zext i16 %i to i32
- %pi = getelementptr i32* %p, i32 %i1
+ %pi = getelementptr i32, i32* %p, i32 %i1
%i.next = add i16 %i, 1
%i.next2 = zext i16 %i.next to i32
- %pi.next = getelementptr i32* %p, i32 %i.next2
- %x = load i32* %pi
+ %pi.next = getelementptr i32, i32* %p, i32 %i.next2
+ %x = load i32, i32* %pi
store i32 42, i32* %pi.next
- %y = load i32* %pi
+ %y = load i32, i32* %pi
%z = sub i32 %x, %y
ret i32 %z
; CHECK-LABEL: @test8(
@@ -163,16 +163,16 @@ define i8 @test9([4 x i8] *%P, i32 %i, i32 %j) {
%i2 = shl i32 %i, 2
%i3 = add i32 %i2, 1
; P2 = P + 1 + 4*i
- %P2 = getelementptr [4 x i8] *%P, i32 0, i32 %i3
+ %P2 = getelementptr [4 x i8], [4 x i8] *%P, i32 0, i32 %i3
%j2 = shl i32 %j, 2
; P4 = P + 4*j
- %P4 = getelementptr [4 x i8]* %P, i32 0, i32 %j2
+ %P4 = getelementptr [4 x i8], [4 x i8]* %P, i32 0, i32 %j2
- %x = load i8* %P2
+ %x = load i8, i8* %P2
store i8 42, i8* %P4
- %y = load i8* %P2
+ %y = load i8, i8* %P2
%z = sub i8 %x, %y
ret i8 %z
; CHECK-LABEL: @test9(
@@ -183,14 +183,14 @@ define i8 @test10([4 x i8] *%P, i32 %i) {
%i2 = shl i32 %i, 2
%i3 = add i32 %i2, 4
; P2 = P + 4 + 4*i
- %P2 = getelementptr [4 x i8] *%P, i32 0, i32 %i3
+ %P2 = getelementptr [4 x i8], [4 x i8] *%P, i32 0, i32 %i3
; P4 = P + 4*i
- %P4 = getelementptr [4 x i8]* %P, i32 0, i32 %i2
+ %P4 = getelementptr [4 x i8], [4 x i8]* %P, i32 0, i32 %i2
- %x = load i8* %P2
+ %x = load i8, i8* %P2
store i8 42, i8* %P4
- %y = load i8* %P2
+ %y = load i8, i8* %P2
%z = sub i8 %x, %y
ret i8 %z
; CHECK-LABEL: @test10(
@@ -201,13 +201,13 @@ define i8 @test10([4 x i8] *%P, i32 %i) {
define float @test11(i32 %indvar, [4 x [2 x float]]* %q) nounwind ssp {
%tmp = mul i32 %indvar, -1
%dec = add i32 %tmp, 3
- %scevgep = getelementptr [4 x [2 x float]]* %q, i32 0, i32 %dec
+ %scevgep = getelementptr [4 x [2 x float]], [4 x [2 x float]]* %q, i32 0, i32 %dec
%scevgep35 = bitcast [2 x float]* %scevgep to i64*
- %arrayidx28 = getelementptr inbounds [4 x [2 x float]]* %q, i32 0, i32 0
- %y29 = getelementptr inbounds [2 x float]* %arrayidx28, i32 0, i32 1
+ %arrayidx28 = getelementptr inbounds [4 x [2 x float]], [4 x [2 x float]]* %q, i32 0, i32 0
+ %y29 = getelementptr inbounds [2 x float], [2 x float]* %arrayidx28, i32 0, i32 1
store float 1.0, float* %y29, align 4
store i64 0, i64* %scevgep35, align 4
- %tmp30 = load float* %y29, align 4
+ %tmp30 = load float, float* %y29, align 4
ret float %tmp30
; CHECK-LABEL: @test11(
; CHECK: ret float %tmp30
@@ -216,14 +216,14 @@ define float @test11(i32 %indvar, [4 x [2 x float]]* %q) nounwind ssp {
; (This was a miscompilation.)
define i32 @test12(i32 %x, i32 %y, i8* %p) nounwind {
%a = bitcast i8* %p to [13 x i8]*
- %b = getelementptr [13 x i8]* %a, i32 %x
+ %b = getelementptr [13 x i8], [13 x i8]* %a, i32 %x
%c = bitcast [13 x i8]* %b to [15 x i8]*
- %d = getelementptr [15 x i8]* %c, i32 %y, i32 8
+ %d = getelementptr [15 x i8], [15 x i8]* %c, i32 %y, i32 8
%castd = bitcast i8* %d to i32*
%castp = bitcast i8* %p to i32*
store i32 1, i32* %castp
store i32 0, i32* %castd
- %r = load i32* %castp
+ %r = load i32, i32* %castp
ret i32 %r
; CHECK-LABEL: @test12(
; CHECK: ret i32 %r