[opaque pointer type] Add textual IR support for explicit type parameter to getelemen...
[oota-llvm.git] / test / Analysis / TypeBasedAliasAnalysis / tbaa-path.ll
index 3c035af7c529665afddcf3d8ee0882a1498b8db3..107aff01ee4923b91048821f8f67de62e1063651 100644 (file)
@@ -28,7 +28,7 @@ entry:
   %0 = load i32** %s.addr, align 8, !tbaa !0
   store i32 1, i32* %0, align 4, !tbaa !6
   %1 = load %struct.StructA** %A.addr, align 8, !tbaa !0
-  %f32 = getelementptr inbounds %struct.StructA* %1, i32 0, i32 1
+  %f32 = getelementptr inbounds %struct.StructA, %struct.StructA* %1, i32 0, i32 1
   store i32 4, i32* %f32, align 4, !tbaa !8
   %2 = load i32** %s.addr, align 8, !tbaa !0
   %3 = load i32* %2, align 4, !tbaa !6
@@ -54,7 +54,7 @@ entry:
   %0 = load i32** %s.addr, align 8, !tbaa !0
   store i32 1, i32* %0, align 4, !tbaa !6
   %1 = load %struct.StructA** %A.addr, align 8, !tbaa !0
-  %f16 = getelementptr inbounds %struct.StructA* %1, i32 0, i32 0
+  %f16 = getelementptr inbounds %struct.StructA, %struct.StructA* %1, i32 0, i32 0
   store i16 4, i16* %f16, align 2, !tbaa !11
   %2 = load i32** %s.addr, align 8, !tbaa !0
   %3 = load i32* %2, align 4, !tbaa !6
@@ -78,14 +78,14 @@ entry:
   store %struct.StructB* %B, %struct.StructB** %B.addr, align 8, !tbaa !0
   store i64 %count, i64* %count.addr, align 8, !tbaa !4
   %0 = load %struct.StructA** %A.addr, align 8, !tbaa !0
-  %f32 = getelementptr inbounds %struct.StructA* %0, i32 0, i32 1
+  %f32 = getelementptr inbounds %struct.StructA, %struct.StructA* %0, i32 0, i32 1
   store i32 1, i32* %f32, align 4, !tbaa !8
   %1 = load %struct.StructB** %B.addr, align 8, !tbaa !0
-  %a = getelementptr inbounds %struct.StructB* %1, i32 0, i32 1
-  %f321 = getelementptr inbounds %struct.StructA* %a, i32 0, i32 1
+  %a = getelementptr inbounds %struct.StructB, %struct.StructB* %1, i32 0, i32 1
+  %f321 = getelementptr inbounds %struct.StructA, %struct.StructA* %a, i32 0, i32 1
   store i32 4, i32* %f321, align 4, !tbaa !12
   %2 = load %struct.StructA** %A.addr, align 8, !tbaa !0
-  %f322 = getelementptr inbounds %struct.StructA* %2, i32 0, i32 1
+  %f322 = getelementptr inbounds %struct.StructA, %struct.StructA* %2, i32 0, i32 1
   %3 = load i32* %f322, align 4, !tbaa !8
   ret i32 %3
 }
@@ -107,14 +107,14 @@ entry:
   store %struct.StructB* %B, %struct.StructB** %B.addr, align 8, !tbaa !0
   store i64 %count, i64* %count.addr, align 8, !tbaa !4
   %0 = load %struct.StructA** %A.addr, align 8, !tbaa !0
-  %f32 = getelementptr inbounds %struct.StructA* %0, i32 0, i32 1
+  %f32 = getelementptr inbounds %struct.StructA, %struct.StructA* %0, i32 0, i32 1
   store i32 1, i32* %f32, align 4, !tbaa !8
   %1 = load %struct.StructB** %B.addr, align 8, !tbaa !0
-  %a = getelementptr inbounds %struct.StructB* %1, i32 0, i32 1
-  %f16 = getelementptr inbounds %struct.StructA* %a, i32 0, i32 0
+  %a = getelementptr inbounds %struct.StructB, %struct.StructB* %1, i32 0, i32 1
+  %f16 = getelementptr inbounds %struct.StructA, %struct.StructA* %a, i32 0, i32 0
   store i16 4, i16* %f16, align 2, !tbaa !14
   %2 = load %struct.StructA** %A.addr, align 8, !tbaa !0
-  %f321 = getelementptr inbounds %struct.StructA* %2, i32 0, i32 1
+  %f321 = getelementptr inbounds %struct.StructA, %struct.StructA* %2, i32 0, i32 1
   %3 = load i32* %f321, align 4, !tbaa !8
   ret i32 %3
 }
@@ -136,13 +136,13 @@ entry:
   store %struct.StructB* %B, %struct.StructB** %B.addr, align 8, !tbaa !0
   store i64 %count, i64* %count.addr, align 8, !tbaa !4
   %0 = load %struct.StructA** %A.addr, align 8, !tbaa !0
-  %f32 = getelementptr inbounds %struct.StructA* %0, i32 0, i32 1
+  %f32 = getelementptr inbounds %struct.StructA, %struct.StructA* %0, i32 0, i32 1
   store i32 1, i32* %f32, align 4, !tbaa !8
   %1 = load %struct.StructB** %B.addr, align 8, !tbaa !0
-  %f321 = getelementptr inbounds %struct.StructB* %1, i32 0, i32 2
+  %f321 = getelementptr inbounds %struct.StructB, %struct.StructB* %1, i32 0, i32 2
   store i32 4, i32* %f321, align 4, !tbaa !15
   %2 = load %struct.StructA** %A.addr, align 8, !tbaa !0
-  %f322 = getelementptr inbounds %struct.StructA* %2, i32 0, i32 1
+  %f322 = getelementptr inbounds %struct.StructA, %struct.StructA* %2, i32 0, i32 1
   %3 = load i32* %f322, align 4, !tbaa !8
   ret i32 %3
 }
@@ -164,14 +164,14 @@ entry:
   store %struct.StructB* %B, %struct.StructB** %B.addr, align 8, !tbaa !0
   store i64 %count, i64* %count.addr, align 8, !tbaa !4
   %0 = load %struct.StructA** %A.addr, align 8, !tbaa !0
-  %f32 = getelementptr inbounds %struct.StructA* %0, i32 0, i32 1
+  %f32 = getelementptr inbounds %struct.StructA, %struct.StructA* %0, i32 0, i32 1
   store i32 1, i32* %f32, align 4, !tbaa !8
   %1 = load %struct.StructB** %B.addr, align 8, !tbaa !0
-  %a = getelementptr inbounds %struct.StructB* %1, i32 0, i32 1
-  %f32_2 = getelementptr inbounds %struct.StructA* %a, i32 0, i32 3
+  %a = getelementptr inbounds %struct.StructB, %struct.StructB* %1, i32 0, i32 1
+  %f32_2 = getelementptr inbounds %struct.StructA, %struct.StructA* %a, i32 0, i32 3
   store i32 4, i32* %f32_2, align 4, !tbaa !16
   %2 = load %struct.StructA** %A.addr, align 8, !tbaa !0
-  %f321 = getelementptr inbounds %struct.StructA* %2, i32 0, i32 1
+  %f321 = getelementptr inbounds %struct.StructA, %struct.StructA* %2, i32 0, i32 1
   %3 = load i32* %f321, align 4, !tbaa !8
   ret i32 %3
 }
@@ -193,13 +193,13 @@ entry:
   store %struct.StructS* %S, %struct.StructS** %S.addr, align 8, !tbaa !0
   store i64 %count, i64* %count.addr, align 8, !tbaa !4
   %0 = load %struct.StructA** %A.addr, align 8, !tbaa !0
-  %f32 = getelementptr inbounds %struct.StructA* %0, i32 0, i32 1
+  %f32 = getelementptr inbounds %struct.StructA, %struct.StructA* %0, i32 0, i32 1
   store i32 1, i32* %f32, align 4, !tbaa !8
   %1 = load %struct.StructS** %S.addr, align 8, !tbaa !0
-  %f321 = getelementptr inbounds %struct.StructS* %1, i32 0, i32 1
+  %f321 = getelementptr inbounds %struct.StructS, %struct.StructS* %1, i32 0, i32 1
   store i32 4, i32* %f321, align 4, !tbaa !17
   %2 = load %struct.StructA** %A.addr, align 8, !tbaa !0
-  %f322 = getelementptr inbounds %struct.StructA* %2, i32 0, i32 1
+  %f322 = getelementptr inbounds %struct.StructA, %struct.StructA* %2, i32 0, i32 1
   %3 = load i32* %f322, align 4, !tbaa !8
   ret i32 %3
 }
@@ -221,13 +221,13 @@ entry:
   store %struct.StructS* %S, %struct.StructS** %S.addr, align 8, !tbaa !0
   store i64 %count, i64* %count.addr, align 8, !tbaa !4
   %0 = load %struct.StructA** %A.addr, align 8, !tbaa !0
-  %f32 = getelementptr inbounds %struct.StructA* %0, i32 0, i32 1
+  %f32 = getelementptr inbounds %struct.StructA, %struct.StructA* %0, i32 0, i32 1
   store i32 1, i32* %f32, align 4, !tbaa !8
   %1 = load %struct.StructS** %S.addr, align 8, !tbaa !0
-  %f16 = getelementptr inbounds %struct.StructS* %1, i32 0, i32 0
+  %f16 = getelementptr inbounds %struct.StructS, %struct.StructS* %1, i32 0, i32 0
   store i16 4, i16* %f16, align 2, !tbaa !19
   %2 = load %struct.StructA** %A.addr, align 8, !tbaa !0
-  %f321 = getelementptr inbounds %struct.StructA* %2, i32 0, i32 1
+  %f321 = getelementptr inbounds %struct.StructA, %struct.StructA* %2, i32 0, i32 1
   %3 = load i32* %f321, align 4, !tbaa !8
   ret i32 %3
 }
@@ -249,13 +249,13 @@ entry:
   store %struct.StructS2* %S2, %struct.StructS2** %S2.addr, align 8, !tbaa !0
   store i64 %count, i64* %count.addr, align 8, !tbaa !4
   %0 = load %struct.StructS** %S.addr, align 8, !tbaa !0
-  %f32 = getelementptr inbounds %struct.StructS* %0, i32 0, i32 1
+  %f32 = getelementptr inbounds %struct.StructS, %struct.StructS* %0, i32 0, i32 1
   store i32 1, i32* %f32, align 4, !tbaa !17
   %1 = load %struct.StructS2** %S2.addr, align 8, !tbaa !0
-  %f321 = getelementptr inbounds %struct.StructS2* %1, i32 0, i32 1
+  %f321 = getelementptr inbounds %struct.StructS2, %struct.StructS2* %1, i32 0, i32 1
   store i32 4, i32* %f321, align 4, !tbaa !20
   %2 = load %struct.StructS** %S.addr, align 8, !tbaa !0
-  %f322 = getelementptr inbounds %struct.StructS* %2, i32 0, i32 1
+  %f322 = getelementptr inbounds %struct.StructS, %struct.StructS* %2, i32 0, i32 1
   %3 = load i32* %f322, align 4, !tbaa !17
   ret i32 %3
 }
@@ -277,13 +277,13 @@ entry:
   store %struct.StructS2* %S2, %struct.StructS2** %S2.addr, align 8, !tbaa !0
   store i64 %count, i64* %count.addr, align 8, !tbaa !4
   %0 = load %struct.StructS** %S.addr, align 8, !tbaa !0
-  %f32 = getelementptr inbounds %struct.StructS* %0, i32 0, i32 1
+  %f32 = getelementptr inbounds %struct.StructS, %struct.StructS* %0, i32 0, i32 1
   store i32 1, i32* %f32, align 4, !tbaa !17
   %1 = load %struct.StructS2** %S2.addr, align 8, !tbaa !0
-  %f16 = getelementptr inbounds %struct.StructS2* %1, i32 0, i32 0
+  %f16 = getelementptr inbounds %struct.StructS2, %struct.StructS2* %1, i32 0, i32 0
   store i16 4, i16* %f16, align 2, !tbaa !22
   %2 = load %struct.StructS** %S.addr, align 8, !tbaa !0
-  %f321 = getelementptr inbounds %struct.StructS* %2, i32 0, i32 1
+  %f321 = getelementptr inbounds %struct.StructS, %struct.StructS* %2, i32 0, i32 1
   %3 = load i32* %f321, align 4, !tbaa !17
   ret i32 %3
 }
@@ -305,19 +305,19 @@ entry:
   store %struct.StructD* %D, %struct.StructD** %D.addr, align 8, !tbaa !0
   store i64 %count, i64* %count.addr, align 8, !tbaa !4
   %0 = load %struct.StructC** %C.addr, align 8, !tbaa !0
-  %b = getelementptr inbounds %struct.StructC* %0, i32 0, i32 1
-  %a = getelementptr inbounds %struct.StructB* %b, i32 0, i32 1
-  %f32 = getelementptr inbounds %struct.StructA* %a, i32 0, i32 1
+  %b = getelementptr inbounds %struct.StructC, %struct.StructC* %0, i32 0, i32 1
+  %a = getelementptr inbounds %struct.StructB, %struct.StructB* %b, i32 0, i32 1
+  %f32 = getelementptr inbounds %struct.StructA, %struct.StructA* %a, i32 0, i32 1
   store i32 1, i32* %f32, align 4, !tbaa !23
   %1 = load %struct.StructD** %D.addr, align 8, !tbaa !0
-  %b1 = getelementptr inbounds %struct.StructD* %1, i32 0, i32 1
-  %a2 = getelementptr inbounds %struct.StructB* %b1, i32 0, i32 1
-  %f323 = getelementptr inbounds %struct.StructA* %a2, i32 0, i32 1
+  %b1 = getelementptr inbounds %struct.StructD, %struct.StructD* %1, i32 0, i32 1
+  %a2 = getelementptr inbounds %struct.StructB, %struct.StructB* %b1, i32 0, i32 1
+  %f323 = getelementptr inbounds %struct.StructA, %struct.StructA* %a2, i32 0, i32 1
   store i32 4, i32* %f323, align 4, !tbaa !25
   %2 = load %struct.StructC** %C.addr, align 8, !tbaa !0
-  %b4 = getelementptr inbounds %struct.StructC* %2, i32 0, i32 1
-  %a5 = getelementptr inbounds %struct.StructB* %b4, i32 0, i32 1
-  %f326 = getelementptr inbounds %struct.StructA* %a5, i32 0, i32 1
+  %b4 = getelementptr inbounds %struct.StructC, %struct.StructC* %2, i32 0, i32 1
+  %a5 = getelementptr inbounds %struct.StructB, %struct.StructB* %b4, i32 0, i32 1
+  %f326 = getelementptr inbounds %struct.StructA, %struct.StructA* %a5, i32 0, i32 1
   %3 = load i32* %f326, align 4, !tbaa !23
   ret i32 %3
 }
@@ -341,22 +341,22 @@ entry:
   store %struct.StructD* %D, %struct.StructD** %D.addr, align 8, !tbaa !0
   store i64 %count, i64* %count.addr, align 8, !tbaa !4
   %0 = load %struct.StructC** %C.addr, align 8, !tbaa !0
-  %b = getelementptr inbounds %struct.StructC* %0, i32 0, i32 1
+  %b = getelementptr inbounds %struct.StructC, %struct.StructC* %0, i32 0, i32 1
   store %struct.StructB* %b, %struct.StructB** %b1, align 8, !tbaa !0
   %1 = load %struct.StructD** %D.addr, align 8, !tbaa !0
-  %b3 = getelementptr inbounds %struct.StructD* %1, i32 0, i32 1
+  %b3 = getelementptr inbounds %struct.StructD, %struct.StructD* %1, i32 0, i32 1
   store %struct.StructB* %b3, %struct.StructB** %b2, align 8, !tbaa !0
   %2 = load %struct.StructB** %b1, align 8, !tbaa !0
-  %a = getelementptr inbounds %struct.StructB* %2, i32 0, i32 1
-  %f32 = getelementptr inbounds %struct.StructA* %a, i32 0, i32 1
+  %a = getelementptr inbounds %struct.StructB, %struct.StructB* %2, i32 0, i32 1
+  %f32 = getelementptr inbounds %struct.StructA, %struct.StructA* %a, i32 0, i32 1
   store i32 1, i32* %f32, align 4, !tbaa !12
   %3 = load %struct.StructB** %b2, align 8, !tbaa !0
-  %a4 = getelementptr inbounds %struct.StructB* %3, i32 0, i32 1
-  %f325 = getelementptr inbounds %struct.StructA* %a4, i32 0, i32 1
+  %a4 = getelementptr inbounds %struct.StructB, %struct.StructB* %3, i32 0, i32 1
+  %f325 = getelementptr inbounds %struct.StructA, %struct.StructA* %a4, i32 0, i32 1
   store i32 4, i32* %f325, align 4, !tbaa !12
   %4 = load %struct.StructB** %b1, align 8, !tbaa !0
-  %a6 = getelementptr inbounds %struct.StructB* %4, i32 0, i32 1
-  %f327 = getelementptr inbounds %struct.StructA* %a6, i32 0, i32 1
+  %a6 = getelementptr inbounds %struct.StructB, %struct.StructB* %4, i32 0, i32 1
+  %f327 = getelementptr inbounds %struct.StructA, %struct.StructA* %a6, i32 0, i32 1
   %5 = load i32* %f327, align 4, !tbaa !12
   ret i32 %5
 }