OSDN Git Service

Update aosp/master llvm for rebase to r233350
[android-x86/external-llvm.git] / test / Analysis / TypeBasedAliasAnalysis / tbaa-path.ll
index 0cd5c30..a2e4dc6 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -tbaa -basicaa -aa-eval -evaluate-tbaa -print-no-aliases -print-may-aliases -disable-output 2>&1 | FileCheck %s
+; RUN: opt < %s -tbaa -basicaa -aa-eval -evaluate-aa-metadata -print-no-aliases -print-may-aliases -disable-output 2>&1 | FileCheck %s
 ; RUN: opt < %s -tbaa -basicaa -gvn -S | FileCheck %s --check-prefix=OPT
 ; Generated from clang/test/CodeGen/tbaa.cpp with "-O1 -struct-path-tbaa -disable-llvm-optzns".
 
@@ -17,7 +17,7 @@ entry:
 ; OPT: define
 ; OPT: store i32 1
 ; OPT: store i32 4
-; OPT: %[[RET:.*]] = load i32*
+; OPT: %[[RET:.*]] = load i32, i32*
 ; OPT: ret i32 %[[RET]]
   %s.addr = alloca i32*, align 8
   %A.addr = alloca %struct.StructA*, align 8
@@ -25,13 +25,13 @@ entry:
   store i32* %s, i32** %s.addr, align 8, !tbaa !0
   store %struct.StructA* %A, %struct.StructA** %A.addr, align 8, !tbaa !0
   store i64 %count, i64* %count.addr, align 8, !tbaa !4
-  %0 = load i32** %s.addr, align 8, !tbaa !0
+  %0 = load i32*, 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
+  %1 = load %struct.StructA*, %struct.StructA** %A.addr, align 8, !tbaa !0
+  %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
+  %2 = load i32*, i32** %s.addr, align 8, !tbaa !0
+  %3 = load i32, i32* %2, align 4, !tbaa !6
   ret i32 %3
 }
 
@@ -43,7 +43,7 @@ entry:
 ; OPT: define
 ; OPT: store i32 1
 ; OPT: store i16 4
-; Remove a load and propogate the value from store.
+; Remove a load and propagate the value from store.
 ; OPT: ret i32 1
   %s.addr = alloca i32*, align 8
   %A.addr = alloca %struct.StructA*, align 8
@@ -51,13 +51,13 @@ entry:
   store i32* %s, i32** %s.addr, align 8, !tbaa !0
   store %struct.StructA* %A, %struct.StructA** %A.addr, align 8, !tbaa !0
   store i64 %count, i64* %count.addr, align 8, !tbaa !4
-  %0 = load i32** %s.addr, align 8, !tbaa !0
+  %0 = load i32*, 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
+  %1 = load %struct.StructA*, %struct.StructA** %A.addr, align 8, !tbaa !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
+  %2 = load i32*, i32** %s.addr, align 8, !tbaa !0
+  %3 = load i32, i32* %2, align 4, !tbaa !6
   ret i32 %3
 }
 
@@ -69,7 +69,7 @@ entry:
 ; OPT: define
 ; OPT: store i32 1
 ; OPT: store i32 4
-; OPT: %[[RET:.*]] = load i32*
+; OPT: %[[RET:.*]] = load i32, i32*
 ; OPT: ret i32 %[[RET]]
   %A.addr = alloca %struct.StructA*, align 8
   %B.addr = alloca %struct.StructB*, align 8
@@ -77,16 +77,16 @@ entry:
   store %struct.StructA* %A, %struct.StructA** %A.addr, align 8, !tbaa !0
   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
+  %0 = load %struct.StructA*, %struct.StructA** %A.addr, align 8, !tbaa !0
+  %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
+  %1 = load %struct.StructB*, %struct.StructB** %B.addr, align 8, !tbaa !0
+  %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
-  %3 = load i32* %f322, align 4, !tbaa !8
+  %2 = load %struct.StructA*, %struct.StructA** %A.addr, align 8, !tbaa !0
+  %f322 = getelementptr inbounds %struct.StructA, %struct.StructA* %2, i32 0, i32 1
+  %3 = load i32, i32* %f322, align 4, !tbaa !8
   ret i32 %3
 }
 
@@ -98,7 +98,7 @@ entry:
 ; OPT: define
 ; OPT: store i32 1
 ; OPT: store i16 4
-; Remove a load and propogate the value from store.
+; Remove a load and propagate the value from store.
 ; OPT: ret i32 1
   %A.addr = alloca %struct.StructA*, align 8
   %B.addr = alloca %struct.StructB*, align 8
@@ -106,16 +106,16 @@ entry:
   store %struct.StructA* %A, %struct.StructA** %A.addr, align 8, !tbaa !0
   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
+  %0 = load %struct.StructA*, %struct.StructA** %A.addr, align 8, !tbaa !0
+  %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
+  %1 = load %struct.StructB*, %struct.StructB** %B.addr, align 8, !tbaa !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
-  %3 = load i32* %f321, align 4, !tbaa !8
+  %2 = load %struct.StructA*, %struct.StructA** %A.addr, align 8, !tbaa !0
+  %f321 = getelementptr inbounds %struct.StructA, %struct.StructA* %2, i32 0, i32 1
+  %3 = load i32, i32* %f321, align 4, !tbaa !8
   ret i32 %3
 }
 
@@ -127,7 +127,7 @@ entry:
 ; OPT: define
 ; OPT: store i32 1
 ; OPT: store i32 4
-; Remove a load and propogate the value from store.
+; Remove a load and propagate the value from store.
 ; OPT: ret i32 1
   %A.addr = alloca %struct.StructA*, align 8
   %B.addr = alloca %struct.StructB*, align 8
@@ -135,15 +135,15 @@ entry:
   store %struct.StructA* %A, %struct.StructA** %A.addr, align 8, !tbaa !0
   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
+  %0 = load %struct.StructA*, %struct.StructA** %A.addr, align 8, !tbaa !0
+  %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
+  %1 = load %struct.StructB*, %struct.StructB** %B.addr, align 8, !tbaa !0
+  %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
-  %3 = load i32* %f322, align 4, !tbaa !8
+  %2 = load %struct.StructA*, %struct.StructA** %A.addr, align 8, !tbaa !0
+  %f322 = getelementptr inbounds %struct.StructA, %struct.StructA* %2, i32 0, i32 1
+  %3 = load i32, i32* %f322, align 4, !tbaa !8
   ret i32 %3
 }
 
@@ -155,7 +155,7 @@ entry:
 ; OPT: define
 ; OPT: store i32 1
 ; OPT: store i32 4
-; Remove a load and propogate the value from store.
+; Remove a load and propagate the value from store.
 ; OPT: ret i32 1
   %A.addr = alloca %struct.StructA*, align 8
   %B.addr = alloca %struct.StructB*, align 8
@@ -163,16 +163,16 @@ entry:
   store %struct.StructA* %A, %struct.StructA** %A.addr, align 8, !tbaa !0
   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
+  %0 = load %struct.StructA*, %struct.StructA** %A.addr, align 8, !tbaa !0
+  %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
+  %1 = load %struct.StructB*, %struct.StructB** %B.addr, align 8, !tbaa !0
+  %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
-  %3 = load i32* %f321, align 4, !tbaa !8
+  %2 = load %struct.StructA*, %struct.StructA** %A.addr, align 8, !tbaa !0
+  %f321 = getelementptr inbounds %struct.StructA, %struct.StructA* %2, i32 0, i32 1
+  %3 = load i32, i32* %f321, align 4, !tbaa !8
   ret i32 %3
 }
 
@@ -184,7 +184,7 @@ entry:
 ; OPT: define
 ; OPT: store i32 1
 ; OPT: store i32 4
-; Remove a load and propogate the value from store.
+; Remove a load and propagate the value from store.
 ; OPT: ret i32 1
   %A.addr = alloca %struct.StructA*, align 8
   %S.addr = alloca %struct.StructS*, align 8
@@ -192,15 +192,15 @@ entry:
   store %struct.StructA* %A, %struct.StructA** %A.addr, align 8, !tbaa !0
   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
+  %0 = load %struct.StructA*, %struct.StructA** %A.addr, align 8, !tbaa !0
+  %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
+  %1 = load %struct.StructS*, %struct.StructS** %S.addr, align 8, !tbaa !0
+  %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
-  %3 = load i32* %f322, align 4, !tbaa !8
+  %2 = load %struct.StructA*, %struct.StructA** %A.addr, align 8, !tbaa !0
+  %f322 = getelementptr inbounds %struct.StructA, %struct.StructA* %2, i32 0, i32 1
+  %3 = load i32, i32* %f322, align 4, !tbaa !8
   ret i32 %3
 }
 
@@ -212,7 +212,7 @@ entry:
 ; OPT: define
 ; OPT: store i32 1
 ; OPT: store i16 4
-; Remove a load and propogate the value from store.
+; Remove a load and propagate the value from store.
 ; OPT: ret i32 1
   %A.addr = alloca %struct.StructA*, align 8
   %S.addr = alloca %struct.StructS*, align 8
@@ -220,15 +220,15 @@ entry:
   store %struct.StructA* %A, %struct.StructA** %A.addr, align 8, !tbaa !0
   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
+  %0 = load %struct.StructA*, %struct.StructA** %A.addr, align 8, !tbaa !0
+  %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
+  %1 = load %struct.StructS*, %struct.StructS** %S.addr, align 8, !tbaa !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
-  %3 = load i32* %f321, align 4, !tbaa !8
+  %2 = load %struct.StructA*, %struct.StructA** %A.addr, align 8, !tbaa !0
+  %f321 = getelementptr inbounds %struct.StructA, %struct.StructA* %2, i32 0, i32 1
+  %3 = load i32, i32* %f321, align 4, !tbaa !8
   ret i32 %3
 }
 
@@ -240,7 +240,7 @@ entry:
 ; OPT: define
 ; OPT: store i32 1
 ; OPT: store i32 4
-; Remove a load and propogate the value from store.
+; Remove a load and propagate the value from store.
 ; OPT: ret i32 1
   %S.addr = alloca %struct.StructS*, align 8
   %S2.addr = alloca %struct.StructS2*, align 8
@@ -248,15 +248,15 @@ entry:
   store %struct.StructS* %S, %struct.StructS** %S.addr, align 8, !tbaa !0
   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
+  %0 = load %struct.StructS*, %struct.StructS** %S.addr, align 8, !tbaa !0
+  %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
+  %1 = load %struct.StructS2*, %struct.StructS2** %S2.addr, align 8, !tbaa !0
+  %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
-  %3 = load i32* %f322, align 4, !tbaa !17
+  %2 = load %struct.StructS*, %struct.StructS** %S.addr, align 8, !tbaa !0
+  %f322 = getelementptr inbounds %struct.StructS, %struct.StructS* %2, i32 0, i32 1
+  %3 = load i32, i32* %f322, align 4, !tbaa !17
   ret i32 %3
 }
 
@@ -268,7 +268,7 @@ entry:
 ; OPT: define
 ; OPT: store i32 1
 ; OPT: store i16 4
-; Remove a load and propogate the value from store.
+; Remove a load and propagate the value from store.
 ; OPT: ret i32 1
   %S.addr = alloca %struct.StructS*, align 8
   %S2.addr = alloca %struct.StructS2*, align 8
@@ -276,15 +276,15 @@ entry:
   store %struct.StructS* %S, %struct.StructS** %S.addr, align 8, !tbaa !0
   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
+  %0 = load %struct.StructS*, %struct.StructS** %S.addr, align 8, !tbaa !0
+  %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
+  %1 = load %struct.StructS2*, %struct.StructS2** %S2.addr, align 8, !tbaa !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
-  %3 = load i32* %f321, align 4, !tbaa !17
+  %2 = load %struct.StructS*, %struct.StructS** %S.addr, align 8, !tbaa !0
+  %f321 = getelementptr inbounds %struct.StructS, %struct.StructS* %2, i32 0, i32 1
+  %3 = load i32, i32* %f321, align 4, !tbaa !17
   ret i32 %3
 }
 
@@ -296,7 +296,7 @@ entry:
 ; OPT: define
 ; OPT: store i32 1
 ; OPT: store i32 4
-; Remove a load and propogate the value from store.
+; Remove a load and propagate the value from store.
 ; OPT: ret i32 1
   %C.addr = alloca %struct.StructC*, align 8
   %D.addr = alloca %struct.StructD*, align 8
@@ -304,21 +304,21 @@ entry:
   store %struct.StructC* %C, %struct.StructC** %C.addr, align 8, !tbaa !0
   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
+  %0 = load %struct.StructC*, %struct.StructC** %C.addr, align 8, !tbaa !0
+  %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
+  %1 = load %struct.StructD*, %struct.StructD** %D.addr, align 8, !tbaa !0
+  %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
-  %3 = load i32* %f326, align 4, !tbaa !23
+  %2 = load %struct.StructC*, %struct.StructC** %C.addr, align 8, !tbaa !0
+  %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, i32* %f326, align 4, !tbaa !23
   ret i32 %3
 }
 
@@ -330,7 +330,7 @@ entry:
 ; OPT: define
 ; OPT: store i32 1
 ; OPT: store i32 4
-; OPT: %[[RET:.*]] = load i32*
+; OPT: %[[RET:.*]] = load i32, i32*
 ; OPT: ret i32 %[[RET]]
   %C.addr = alloca %struct.StructC*, align 8
   %D.addr = alloca %struct.StructD*, align 8
@@ -340,53 +340,53 @@ entry:
   store %struct.StructC* %C, %struct.StructC** %C.addr, align 8, !tbaa !0
   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
+  %0 = load %struct.StructC*, %struct.StructC** %C.addr, align 8, !tbaa !0
+  %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
+  %1 = load %struct.StructD*, %struct.StructD** %D.addr, align 8, !tbaa !0
+  %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
+  %2 = load %struct.StructB*, %struct.StructB** %b1, align 8, !tbaa !0
+  %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
+  %3 = load %struct.StructB*, %struct.StructB** %b2, align 8, !tbaa !0
+  %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
-  %5 = load i32* %f327, align 4, !tbaa !12
+  %4 = load %struct.StructB*, %struct.StructB** %b1, align 8, !tbaa !0
+  %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, i32* %f327, align 4, !tbaa !12
   ret i32 %5
 }
 
 attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-frame-pointer-elim-non-leaf"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }
 
-!0 = metadata !{metadata !1, metadata !1, i64 0}
-!1 = metadata !{metadata !"any pointer", metadata !2}
-!2 = metadata !{metadata !"omnipotent char", metadata !3}
-!3 = metadata !{metadata !"Simple C/C++ TBAA"}
-!4 = metadata !{metadata !5, metadata !5, i64 0}
-!5 = metadata !{metadata !"long long", metadata !2}
-!6 = metadata !{metadata !7, metadata !7, i64 0}
-!7 = metadata !{metadata !"int", metadata !2}
-!8 = metadata !{metadata !9, metadata !7, i64 4}
-!9 = metadata !{metadata !"_ZTS7StructA", metadata !10, i64 0, metadata !7, i64 4, metadata !10, i64 8, metadata !7, i64 12}
-!10 = metadata !{metadata !"short", metadata !2}
-!11 = metadata !{metadata !9, metadata !10, i64 0}
-!12 = metadata !{metadata !13, metadata !7, i64 8}
-!13 = metadata !{metadata !"_ZTS7StructB", metadata !10, i64 0, metadata !9, i64 4, metadata !7, i64 20}
-!14 = metadata !{metadata !13, metadata !10, i64 4}
-!15 = metadata !{metadata !13, metadata !7, i64 20}
-!16 = metadata !{metadata !13, metadata !7, i64 16}
-!17 = metadata !{metadata !18, metadata !7, i64 4}
-!18 = metadata !{metadata !"_ZTS7StructS", metadata !10, i64 0, metadata !7, i64 4}
-!19 = metadata !{metadata !18, metadata !10, i64 0}
-!20 = metadata !{metadata !21, metadata !7, i64 4}
-!21 = metadata !{metadata !"_ZTS8StructS2", metadata !10, i64 0, metadata !7, i64 4}
-!22 = metadata !{metadata !21, metadata !10, i64 0}
-!23 = metadata !{metadata !24, metadata !7, i64 12}
-!24 = metadata !{metadata !"_ZTS7StructC", metadata !10, i64 0, metadata !13, i64 4, metadata !7, i64 28}
-!25 = metadata !{metadata !26, metadata !7, i64 12}
-!26 = metadata !{metadata !"_ZTS7StructD", metadata !10, i64 0, metadata !13, i64 4, metadata !7, i64 28, metadata !2, i64 32}
+!0 = !{!1, !1, i64 0}
+!1 = !{!"any pointer", !2}
+!2 = !{!"omnipotent char", !3}
+!3 = !{!"Simple C/C++ TBAA"}
+!4 = !{!5, !5, i64 0}
+!5 = !{!"long long", !2}
+!6 = !{!7, !7, i64 0}
+!7 = !{!"int", !2}
+!8 = !{!9, !7, i64 4}
+!9 = !{!"_ZTS7StructA", !10, i64 0, !7, i64 4, !10, i64 8, !7, i64 12}
+!10 = !{!"short", !2}
+!11 = !{!9, !10, i64 0}
+!12 = !{!13, !7, i64 8}
+!13 = !{!"_ZTS7StructB", !10, i64 0, !9, i64 4, !7, i64 20}
+!14 = !{!13, !10, i64 4}
+!15 = !{!13, !7, i64 20}
+!16 = !{!13, !7, i64 16}
+!17 = !{!18, !7, i64 4}
+!18 = !{!"_ZTS7StructS", !10, i64 0, !7, i64 4}
+!19 = !{!18, !10, i64 0}
+!20 = !{!21, !7, i64 4}
+!21 = !{!"_ZTS8StructS2", !10, i64 0, !7, i64 4}
+!22 = !{!21, !10, i64 0}
+!23 = !{!24, !7, i64 12}
+!24 = !{!"_ZTS7StructC", !10, i64 0, !13, i64 4, !7, i64 28}
+!25 = !{!26, !7, i64 12}
+!26 = !{!"_ZTS7StructD", !10, i64 0, !13, i64 4, !7, i64 28, !2, i64 32}