aboutsummaryrefslogtreecommitdiffstats
path: root/test/Analysis/TypeBasedAliasAnalysis
diff options
context:
space:
mode:
Diffstat (limited to 'test/Analysis/TypeBasedAliasAnalysis')
-rw-r--r--test/Analysis/TypeBasedAliasAnalysis/PR17620.ll8
-rw-r--r--test/Analysis/TypeBasedAliasAnalysis/aliastest.ll16
-rw-r--r--test/Analysis/TypeBasedAliasAnalysis/argument-promotion.ll4
-rw-r--r--test/Analysis/TypeBasedAliasAnalysis/cyclic.ll26
-rw-r--r--test/Analysis/TypeBasedAliasAnalysis/dse.ll16
-rw-r--r--test/Analysis/TypeBasedAliasAnalysis/dynamic-indices.ll50
-rw-r--r--test/Analysis/TypeBasedAliasAnalysis/gvn-nonlocal-type-mismatch.ll16
-rw-r--r--test/Analysis/TypeBasedAliasAnalysis/licm.ll12
-rw-r--r--test/Analysis/TypeBasedAliasAnalysis/placement-tbaa.ll30
-rw-r--r--test/Analysis/TypeBasedAliasAnalysis/precedence.ll6
-rw-r--r--test/Analysis/TypeBasedAliasAnalysis/sink.ll4
-rw-r--r--test/Analysis/TypeBasedAliasAnalysis/tbaa-path.ll198
12 files changed, 206 insertions, 180 deletions
diff --git a/test/Analysis/TypeBasedAliasAnalysis/PR17620.ll b/test/Analysis/TypeBasedAliasAnalysis/PR17620.ll
index 920d6f5..e78529c 100644
--- a/test/Analysis/TypeBasedAliasAnalysis/PR17620.ll
+++ b/test/Analysis/TypeBasedAliasAnalysis/PR17620.ll
@@ -16,11 +16,11 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
define %structA** @test(%classA* %this, i32** %p1) #0 align 2 {
entry:
; CHECK-LABEL: @test
-; CHECK: load i32** %p1, align 8, !tbaa
-; CHECK: load i32** getelementptr (%classC* null, i32 0, i32 1, i32 0, i32 0), align 8, !tbaa
+; CHECK: load i32*, i32** %p1, align 8, !tbaa
+; CHECK: load i32*, i32** getelementptr (%classC, %classC* null, i32 0, i32 1, i32 0, i32 0), align 8, !tbaa
; CHECK: call void @callee
- %0 = load i32** %p1, align 8, !tbaa !1
- %1 = load i32** getelementptr (%classC* null, i32 0, i32 1, i32 0, i32 0), align 8, !tbaa !5
+ %0 = load i32*, i32** %p1, align 8, !tbaa !1
+ %1 = load i32*, i32** getelementptr (%classC, %classC* null, i32 0, i32 1, i32 0, i32 0), align 8, !tbaa !5
call void @callee(i32* %0, i32* %1)
unreachable
}
diff --git a/test/Analysis/TypeBasedAliasAnalysis/aliastest.ll b/test/Analysis/TypeBasedAliasAnalysis/aliastest.ll
index 10da13a..93c34f9 100644
--- a/test/Analysis/TypeBasedAliasAnalysis/aliastest.ll
+++ b/test/Analysis/TypeBasedAliasAnalysis/aliastest.ll
@@ -5,9 +5,9 @@
; CHECK: @test0_yes
; CHECK: add i8 %x, %x
define i8 @test0_yes(i8* %a, i8* %b) nounwind {
- %x = load i8* %a, !tbaa !1
+ %x = load i8, i8* %a, !tbaa !1
store i8 0, i8* %b, !tbaa !2
- %y = load i8* %a, !tbaa !1
+ %y = load i8, i8* %a, !tbaa !1
%z = add i8 %x, %y
ret i8 %z
}
@@ -15,9 +15,9 @@ define i8 @test0_yes(i8* %a, i8* %b) nounwind {
; CHECK: @test0_no
; CHECK: add i8 %x, %y
define i8 @test0_no(i8* %a, i8* %b) nounwind {
- %x = load i8* %a, !tbaa !3
+ %x = load i8, i8* %a, !tbaa !3
store i8 0, i8* %b, !tbaa !4
- %y = load i8* %a, !tbaa !3
+ %y = load i8, i8* %a, !tbaa !3
%z = add i8 %x, %y
ret i8 %z
}
@@ -27,9 +27,9 @@ define i8 @test0_no(i8* %a, i8* %b) nounwind {
; CHECK: @test1_yes
; CHECK: add i8 %x, %x
define i8 @test1_yes(i8* %a, i8* %b) nounwind {
- %x = load i8* %a, !tbaa !5
+ %x = load i8, i8* %a, !tbaa !5
store i8 0, i8* %b
- %y = load i8* %a, !tbaa !5
+ %y = load i8, i8* %a, !tbaa !5
%z = add i8 %x, %y
ret i8 %z
}
@@ -37,9 +37,9 @@ define i8 @test1_yes(i8* %a, i8* %b) nounwind {
; CHECK: @test1_no
; CHECK: add i8 %x, %y
define i8 @test1_no(i8* %a, i8* %b) nounwind {
- %x = load i8* %a, !tbaa !6
+ %x = load i8, i8* %a, !tbaa !6
store i8 0, i8* %b
- %y = load i8* %a, !tbaa !6
+ %y = load i8, i8* %a, !tbaa !6
%z = add i8 %x, %y
ret i8 %z
}
diff --git a/test/Analysis/TypeBasedAliasAnalysis/argument-promotion.ll b/test/Analysis/TypeBasedAliasAnalysis/argument-promotion.ll
index 31f775e..a7987f7 100644
--- a/test/Analysis/TypeBasedAliasAnalysis/argument-promotion.ll
+++ b/test/Analysis/TypeBasedAliasAnalysis/argument-promotion.ll
@@ -6,8 +6,8 @@ target datalayout = "E-p:64:64:64"
; CHECK-NOT: alloca
define internal i32 @test(i32* %X, i32* %Y, i32* %Q) {
store i32 77, i32* %Q, !tbaa !2
- %A = load i32* %X, !tbaa !1
- %B = load i32* %Y, !tbaa !1
+ %A = load i32, i32* %X, !tbaa !1
+ %B = load i32, i32* %Y, !tbaa !1
%C = add i32 %A, %B
ret i32 %C
}
diff --git a/test/Analysis/TypeBasedAliasAnalysis/cyclic.ll b/test/Analysis/TypeBasedAliasAnalysis/cyclic.ll
new file mode 100644
index 0000000..a88e26c
--- /dev/null
+++ b/test/Analysis/TypeBasedAliasAnalysis/cyclic.ll
@@ -0,0 +1,26 @@
+; RUN: not opt -instcombine < %s 2>&1 | FileCheck %s
+; CHECK: Cycle found in TBAA metadata.
+
+define void @test6(i32* %gi) #0 {
+entry:
+ store i32 42, i32* %gi, align 4, !tbaa !0
+ br label %for.cond
+
+for.cond: ; preds = %for.body, %entry
+ br i1 undef, label %for.body, label %for.end
+
+for.body: ; preds = %for.cond
+ store i32 undef, i32* %gi, align 4, !tbaa !2
+ br label %for.cond
+
+for.end: ; preds = %for.cond
+ ret void
+}
+
+attributes #0 = { nounwind ssp uwtable }
+
+!0 = !{!1, !1, i64 0}
+!1 = !{!"Simple C/C++ TBAA"}
+!2 = distinct !{!3, !2, i64 0}
+!3 = !{!"int", !4}
+!4 = !{!"omnipotent ", !1}
diff --git a/test/Analysis/TypeBasedAliasAnalysis/dse.ll b/test/Analysis/TypeBasedAliasAnalysis/dse.ll
index 09f8feb..b6dc9b2 100644
--- a/test/Analysis/TypeBasedAliasAnalysis/dse.ll
+++ b/test/Analysis/TypeBasedAliasAnalysis/dse.ll
@@ -4,47 +4,47 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
; DSE should make use of TBAA.
; CHECK: @test0_yes
-; CHECK-NEXT: load i8* %b
+; CHECK-NEXT: load i8, i8* %b
; CHECK-NEXT: store i8 1, i8* %a
; CHECK-NEXT: ret i8 %y
define i8 @test0_yes(i8* %a, i8* %b) nounwind {
store i8 0, i8* %a, !tbaa !1
- %y = load i8* %b, !tbaa !2
+ %y = load i8, i8* %b, !tbaa !2
store i8 1, i8* %a, !tbaa !1
ret i8 %y
}
; CHECK: @test0_no
; CHECK-NEXT: store i8 0, i8* %a
-; CHECK-NEXT: load i8* %b
+; CHECK-NEXT: load i8, i8* %b
; CHECK-NEXT: store i8 1, i8* %a
; CHECK-NEXT: ret i8 %y
define i8 @test0_no(i8* %a, i8* %b) nounwind {
store i8 0, i8* %a, !tbaa !3
- %y = load i8* %b, !tbaa !4
+ %y = load i8, i8* %b, !tbaa !4
store i8 1, i8* %a, !tbaa !3
ret i8 %y
}
; CHECK: @test1_yes
-; CHECK-NEXT: load i8* %b
+; CHECK-NEXT: load i8, i8* %b
; CHECK-NEXT: store i8 1, i8* %a
; CHECK-NEXT: ret i8 %y
define i8 @test1_yes(i8* %a, i8* %b) nounwind {
store i8 0, i8* %a
- %y = load i8* %b, !tbaa !5
+ %y = load i8, i8* %b, !tbaa !5
store i8 1, i8* %a
ret i8 %y
}
; CHECK: @test1_no
; CHECK-NEXT: store i8 0, i8* %a
-; CHECK-NEXT: load i8* %b
+; CHECK-NEXT: load i8, i8* %b
; CHECK-NEXT: store i8 1, i8* %a
; CHECK-NEXT: ret i8 %y
define i8 @test1_no(i8* %a, i8* %b) nounwind {
store i8 0, i8* %a
- %y = load i8* %b, !tbaa !6
+ %y = load i8, i8* %b, !tbaa !6
store i8 1, i8* %a
ret i8 %y
}
diff --git a/test/Analysis/TypeBasedAliasAnalysis/dynamic-indices.ll b/test/Analysis/TypeBasedAliasAnalysis/dynamic-indices.ll
index 732f5d7..afc83c9 100644
--- a/test/Analysis/TypeBasedAliasAnalysis/dynamic-indices.ll
+++ b/test/Analysis/TypeBasedAliasAnalysis/dynamic-indices.ll
@@ -12,8 +12,8 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
; CHECK: define void @vrlh(
; CHECK: for.end:
-; CHECK: %arrayidx31 = getelementptr inbounds %union.vector_t* %t, i64 0, i32 0, i64 1
-; CHECK: %tmp32 = load i64* %arrayidx31, align 8, !tbaa [[TAG:!.*]]
+; CHECK: %arrayidx31 = getelementptr inbounds %union.vector_t, %union.vector_t* %t, i64 0, i32 0, i64 1
+; CHECK: %tmp32 = load i64, i64* %arrayidx31, align 8, !tbaa [[TAG:!.*]]
define void @vrlh(%union.vector_t* %va, %union.vector_t* %vb, %union.vector_t* %vd) nounwind {
entry:
@@ -25,22 +25,22 @@ for.body: ; preds = %entry, %for.body
%sub = sub nsw i32 7, %i.01
%idxprom = sext i32 %sub to i64
%half = bitcast %union.vector_t* %vb to [8 x i16]*
- %arrayidx = getelementptr inbounds [8 x i16]* %half, i64 0, i64 %idxprom
- %tmp4 = load i16* %arrayidx, align 2, !tbaa !0
+ %arrayidx = getelementptr inbounds [8 x i16], [8 x i16]* %half, i64 0, i64 %idxprom
+ %tmp4 = load i16, i16* %arrayidx, align 2, !tbaa !0
%conv = zext i16 %tmp4 to i32
%and = and i32 %conv, 15
%sub6 = sub nsw i32 7, %i.01
%idxprom7 = sext i32 %sub6 to i64
%half9 = bitcast %union.vector_t* %va to [8 x i16]*
- %arrayidx10 = getelementptr inbounds [8 x i16]* %half9, i64 0, i64 %idxprom7
- %tmp11 = load i16* %arrayidx10, align 2, !tbaa !0
+ %arrayidx10 = getelementptr inbounds [8 x i16], [8 x i16]* %half9, i64 0, i64 %idxprom7
+ %tmp11 = load i16, i16* %arrayidx10, align 2, !tbaa !0
%conv12 = zext i16 %tmp11 to i32
%shl = shl i32 %conv12, %and
%sub15 = sub nsw i32 7, %i.01
%idxprom16 = sext i32 %sub15 to i64
%half18 = bitcast %union.vector_t* %va to [8 x i16]*
- %arrayidx19 = getelementptr inbounds [8 x i16]* %half18, i64 0, i64 %idxprom16
- %tmp20 = load i16* %arrayidx19, align 2, !tbaa !0
+ %arrayidx19 = getelementptr inbounds [8 x i16], [8 x i16]* %half18, i64 0, i64 %idxprom16
+ %tmp20 = load i16, i16* %arrayidx19, align 2, !tbaa !0
%conv21 = zext i16 %tmp20 to i32
%sub23 = sub nsw i32 16, %and
%shr = lshr i32 %conv21, %sub23
@@ -49,20 +49,20 @@ for.body: ; preds = %entry, %for.body
%sub26 = sub nsw i32 7, %i.01
%idxprom27 = sext i32 %sub26 to i64
%half28 = bitcast %union.vector_t* %t to [8 x i16]*
- %arrayidx29 = getelementptr inbounds [8 x i16]* %half28, i64 0, i64 %idxprom27
+ %arrayidx29 = getelementptr inbounds [8 x i16], [8 x i16]* %half28, i64 0, i64 %idxprom27
store i16 %conv24, i16* %arrayidx29, align 2, !tbaa !0
%inc = add nsw i32 %i.01, 1
%cmp = icmp slt i32 %inc, 8
br i1 %cmp, label %for.body, label %for.end
for.end: ; preds = %for.body
- %arrayidx31 = getelementptr inbounds %union.vector_t* %t, i64 0, i32 0, i64 1
- %tmp32 = load i64* %arrayidx31, align 8, !tbaa !3
- %arrayidx35 = getelementptr inbounds %union.vector_t* %vd, i64 0, i32 0, i64 1
+ %arrayidx31 = getelementptr inbounds %union.vector_t, %union.vector_t* %t, i64 0, i32 0, i64 1
+ %tmp32 = load i64, i64* %arrayidx31, align 8, !tbaa !3
+ %arrayidx35 = getelementptr inbounds %union.vector_t, %union.vector_t* %vd, i64 0, i32 0, i64 1
store i64 %tmp32, i64* %arrayidx35, align 8, !tbaa !3
- %arrayidx37 = getelementptr inbounds %union.vector_t* %t, i64 0, i32 0, i64 0
- %tmp38 = load i64* %arrayidx37, align 8, !tbaa !3
- %arrayidx41 = getelementptr inbounds %union.vector_t* %vd, i64 0, i32 0, i64 0
+ %arrayidx37 = getelementptr inbounds %union.vector_t, %union.vector_t* %t, i64 0, i32 0, i64 0
+ %tmp38 = load i64, i64* %arrayidx37, align 8, !tbaa !3
+ %arrayidx41 = getelementptr inbounds %union.vector_t, %union.vector_t* %vd, i64 0, i32 0, i64 0
store i64 %tmp38, i64* %arrayidx41, align 8, !tbaa !3
ret void
}
@@ -75,14 +75,14 @@ for.end: ; preds = %for.body
define i32 @test0(%struct.X* %a) nounwind {
entry:
- %i = getelementptr inbounds %struct.X* %a, i64 0, i32 0
+ %i = getelementptr inbounds %struct.X, %struct.X* %a, i64 0, i32 0
store i32 0, i32* %i, align 4, !tbaa !4
br label %for.body
for.body: ; preds = %entry, %for.body
%i2.01 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
- %f = getelementptr inbounds %struct.X* %a, i64 %i2.01, i32 1
- %tmp6 = load float* %f, align 4, !tbaa !5
+ %f = getelementptr inbounds %struct.X, %struct.X* %a, i64 %i2.01, i32 1
+ %tmp6 = load float, float* %f, align 4, !tbaa !5
%mul = fmul float %tmp6, 0x40019999A0000000
store float %mul, float* %f, align 4, !tbaa !5
%inc = add nsw i64 %i2.01, 1
@@ -90,8 +90,8 @@ for.body: ; preds = %entry, %for.body
br i1 %cmp, label %for.body, label %for.end
for.end: ; preds = %for.body
- %i9 = getelementptr inbounds %struct.X* %a, i64 0, i32 0
- %tmp10 = load i32* %i9, align 4, !tbaa !4
+ %i9 = getelementptr inbounds %struct.X, %struct.X* %a, i64 0, i32 0
+ %tmp10 = load i32, i32* %i9, align 4, !tbaa !4
ret i32 %tmp10
}
@@ -103,14 +103,14 @@ for.end: ; preds = %for.body
define float @test1(%struct.X* %a) nounwind {
entry:
- %f = getelementptr inbounds %struct.X* %a, i64 0, i32 1
+ %f = getelementptr inbounds %struct.X, %struct.X* %a, i64 0, i32 1
store float 0x3FD3333340000000, float* %f, align 4, !tbaa !5
br label %for.body
for.body: ; preds = %entry, %for.body
%i.01 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
- %i5 = getelementptr inbounds %struct.X* %a, i64 %i.01, i32 0
- %tmp6 = load i32* %i5, align 4, !tbaa !4
+ %i5 = getelementptr inbounds %struct.X, %struct.X* %a, i64 %i.01, i32 0
+ %tmp6 = load i32, i32* %i5, align 4, !tbaa !4
%mul = mul nsw i32 %tmp6, 3
store i32 %mul, i32* %i5, align 4, !tbaa !4
%inc = add nsw i64 %i.01, 1
@@ -118,8 +118,8 @@ for.body: ; preds = %entry, %for.body
br i1 %cmp, label %for.body, label %for.end
for.end: ; preds = %for.body
- %f9 = getelementptr inbounds %struct.X* %a, i64 0, i32 1
- %tmp10 = load float* %f9, align 4, !tbaa !5
+ %f9 = getelementptr inbounds %struct.X, %struct.X* %a, i64 0, i32 1
+ %tmp10 = load float, float* %f9, align 4, !tbaa !5
ret float %tmp10
}
diff --git a/test/Analysis/TypeBasedAliasAnalysis/gvn-nonlocal-type-mismatch.ll b/test/Analysis/TypeBasedAliasAnalysis/gvn-nonlocal-type-mismatch.ll
index edea6d0..aaa43a4 100644
--- a/test/Analysis/TypeBasedAliasAnalysis/gvn-nonlocal-type-mismatch.ll
+++ b/test/Analysis/TypeBasedAliasAnalysis/gvn-nonlocal-type-mismatch.ll
@@ -17,7 +17,7 @@ entry:
br i1 %c, label %if.else, label %if.then
if.then:
- %t = load i32* %p, !tbaa !1
+ %t = load i32, i32* %p, !tbaa !1
store i32 %t, i32* %q
ret void
@@ -32,11 +32,11 @@ if.else:
; CHECK: @watch_out_for_type_change
; CHECK: if.then:
-; CHECK: %t = load i32* %p
+; CHECK: %t = load i32, i32* %p
; CHECK: store i32 %t, i32* %q
; CHECK: ret void
; CHECK: if.else:
-; CHECK: %u = load i32* %p
+; CHECK: %u = load i32, i32* %p
; CHECK: store i32 %u, i32* %q
define void @watch_out_for_type_change(i1 %c, i32* %p, i32* %p1, i32* %q) nounwind {
@@ -46,12 +46,12 @@ entry:
br i1 %c, label %if.else, label %if.then
if.then:
- %t = load i32* %p, !tbaa !3
+ %t = load i32, i32* %p, !tbaa !3
store i32 %t, i32* %q
ret void
if.else:
- %u = load i32* %p, !tbaa !4
+ %u = load i32, i32* %p, !tbaa !4
store i32 %u, i32* %q
ret void
}
@@ -64,7 +64,7 @@ if.else:
; CHECK: store i32 0, i32* %q
; CHECK: ret void
; CHECK: if.else:
-; CHECK: %u = load i32* %p
+; CHECK: %u = load i32, i32* %p
; CHECK: store i32 %u, i32* %q
define void @watch_out_for_another_type_change(i1 %c, i32* %p, i32* %p1, i32* %q) nounwind {
@@ -74,12 +74,12 @@ entry:
br i1 %c, label %if.else, label %if.then
if.then:
- %t = load i32* %p, !tbaa !4
+ %t = load i32, i32* %p, !tbaa !4
store i32 %t, i32* %q
ret void
if.else:
- %u = load i32* %p, !tbaa !3
+ %u = load i32, i32* %p, !tbaa !3
store i32 %u, i32* %q
ret void
}
diff --git a/test/Analysis/TypeBasedAliasAnalysis/licm.ll b/test/Analysis/TypeBasedAliasAnalysis/licm.ll
index 0722a2c..fe07730 100644
--- a/test/Analysis/TypeBasedAliasAnalysis/licm.ll
+++ b/test/Analysis/TypeBasedAliasAnalysis/licm.ll
@@ -5,7 +5,7 @@
; CHECK: @foo
; CHECK: entry:
-; CHECK-NEXT: %tmp3 = load double** @P, !tbaa !0
+; CHECK-NEXT: %tmp3 = load double*, double** @P, !tbaa !0
; CHECK-NEXT: br label %for.body
@P = common global double* null
@@ -16,9 +16,9 @@ entry:
for.body: ; preds = %entry, %for.body
%i.07 = phi i64 [ %inc, %for.body ], [ 0, %entry ]
- %tmp3 = load double** @P, !tbaa !1
- %scevgep = getelementptr double* %tmp3, i64 %i.07
- %tmp4 = load double* %scevgep, !tbaa !2
+ %tmp3 = load double*, double** @P, !tbaa !1
+ %scevgep = getelementptr double, double* %tmp3, i64 %i.07
+ %tmp4 = load double, double* %scevgep, !tbaa !2
%mul = fmul double %tmp4, 2.300000e+00
store double %mul, double* %scevgep, !tbaa !2
%inc = add i64 %i.07, 1
@@ -49,9 +49,9 @@ entry:
br label %loop
loop:
- %tmp51 = load i8** %p, !tbaa !4
+ %tmp51 = load i8*, i8** %p, !tbaa !4
store i8* %tmp51, i8** %p
- %tmp40 = load i8* %q, !tbaa !5
+ %tmp40 = load i8, i8* %q, !tbaa !5
store i8 %tmp40, i8* %q
br label %loop
}
diff --git a/test/Analysis/TypeBasedAliasAnalysis/placement-tbaa.ll b/test/Analysis/TypeBasedAliasAnalysis/placement-tbaa.ll
index fd05dbe..aa91020 100644
--- a/test/Analysis/TypeBasedAliasAnalysis/placement-tbaa.ll
+++ b/test/Analysis/TypeBasedAliasAnalysis/placement-tbaa.ll
@@ -33,20 +33,20 @@ entry:
%call = call noalias i8* @_Znwm(i64 8)
%0 = bitcast i8* %call to %struct.Foo*
store %struct.Foo* %0, %struct.Foo** %f, align 8, !tbaa !4
- %1 = load %struct.Foo** %f, align 8, !tbaa !4
- %i = getelementptr inbounds %struct.Foo* %1, i32 0, i32 0
+ %1 = load %struct.Foo*, %struct.Foo** %f, align 8, !tbaa !4
+ %i = getelementptr inbounds %struct.Foo, %struct.Foo* %1, i32 0, i32 0
store i64 1, i64* %i, align 8, !tbaa !6
store i32 0, i32* %i1, align 4, !tbaa !0
br label %for.cond
for.cond:
- %2 = load i32* %i1, align 4, !tbaa !0
- %3 = load i32* %n.addr, align 4, !tbaa !0
+ %2 = load i32, i32* %i1, align 4, !tbaa !0
+ %3 = load i32, i32* %n.addr, align 4, !tbaa !0
%cmp = icmp slt i32 %2, %3
br i1 %cmp, label %for.body, label %for.end
for.body:
- %4 = load %struct.Foo** %f, align 8, !tbaa !4
+ %4 = load %struct.Foo*, %struct.Foo** %f, align 8, !tbaa !4
%5 = bitcast %struct.Foo* %4 to i8*
%new.isnull = icmp eq i8* %5, null
br i1 %new.isnull, label %new.cont, label %new.notnull
@@ -58,10 +58,10 @@ new.notnull:
new.cont:
%7 = phi %struct.Bar* [ %6, %new.notnull ], [ null, %for.body ]
store %struct.Bar* %7, %struct.Bar** %b, align 8, !tbaa !4
- %8 = load %struct.Bar** %b, align 8, !tbaa !4
- %p = getelementptr inbounds %struct.Bar* %8, i32 0, i32 0
+ %8 = load %struct.Bar*, %struct.Bar** %b, align 8, !tbaa !4
+ %p = getelementptr inbounds %struct.Bar, %struct.Bar* %8, i32 0, i32 0
store i8* null, i8** %p, align 8, !tbaa !9
- %9 = load %struct.Foo** %f, align 8, !tbaa !4
+ %9 = load %struct.Foo*, %struct.Foo** %f, align 8, !tbaa !4
%10 = bitcast %struct.Foo* %9 to i8*
%new.isnull2 = icmp eq i8* %10, null
br i1 %new.isnull2, label %new.cont4, label %new.notnull3
@@ -73,23 +73,23 @@ new.notnull3:
new.cont4:
%12 = phi %struct.Foo* [ %11, %new.notnull3 ], [ null, %new.cont ]
store %struct.Foo* %12, %struct.Foo** %f, align 8, !tbaa !4
- %13 = load i32* %i1, align 4, !tbaa !0
+ %13 = load i32, i32* %i1, align 4, !tbaa !0
%conv = sext i32 %13 to i64
- %14 = load %struct.Foo** %f, align 8, !tbaa !4
- %i5 = getelementptr inbounds %struct.Foo* %14, i32 0, i32 0
+ %14 = load %struct.Foo*, %struct.Foo** %f, align 8, !tbaa !4
+ %i5 = getelementptr inbounds %struct.Foo, %struct.Foo* %14, i32 0, i32 0
store i64 %conv, i64* %i5, align 8, !tbaa !6
br label %for.inc
for.inc:
- %15 = load i32* %i1, align 4, !tbaa !0
+ %15 = load i32, i32* %i1, align 4, !tbaa !0
%inc = add nsw i32 %15, 1
store i32 %inc, i32* %i1, align 4, !tbaa !0
br label %for.cond
for.end:
- %16 = load %struct.Foo** %f, align 8, !tbaa !4
- %i6 = getelementptr inbounds %struct.Foo* %16, i32 0, i32 0
- %17 = load i64* %i6, align 8, !tbaa !6
+ %16 = load %struct.Foo*, %struct.Foo** %f, align 8, !tbaa !4
+ %i6 = getelementptr inbounds %struct.Foo, %struct.Foo* %16, i32 0, i32 0
+ %17 = load i64, i64* %i6, align 8, !tbaa !6
ret i64 %17
}
diff --git a/test/Analysis/TypeBasedAliasAnalysis/precedence.ll b/test/Analysis/TypeBasedAliasAnalysis/precedence.ll
index 0b697b2..b2931ca 100644
--- a/test/Analysis/TypeBasedAliasAnalysis/precedence.ll
+++ b/test/Analysis/TypeBasedAliasAnalysis/precedence.ll
@@ -18,7 +18,7 @@ entry:
store i32 0, i32* %x, !tbaa !0
%0 = bitcast i32* %x to float*
store float 0x4002666660000000, float* %0, !tbaa !3
- %tmp3 = load i32* %x, !tbaa !0
+ %tmp3 = load i32, i32* %x, !tbaa !0
ret i32 %tmp3
}
@@ -33,9 +33,9 @@ define i64 @offset(i64* %x) nounwind {
entry:
store i64 0, i64* %x, !tbaa !4
%0 = bitcast i64* %x to i8*
- %1 = getelementptr i8* %0, i64 1
+ %1 = getelementptr i8, i8* %0, i64 1
store i8 1, i8* %1, !tbaa !5
- %tmp3 = load i64* %x, !tbaa !4
+ %tmp3 = load i64, i64* %x, !tbaa !4
ret i64 %tmp3
}
diff --git a/test/Analysis/TypeBasedAliasAnalysis/sink.ll b/test/Analysis/TypeBasedAliasAnalysis/sink.ll
index 1a124b8..c95dc15 100644
--- a/test/Analysis/TypeBasedAliasAnalysis/sink.ll
+++ b/test/Analysis/TypeBasedAliasAnalysis/sink.ll
@@ -1,11 +1,11 @@
; RUN: opt -tbaa -sink -S < %s | FileCheck %s
; CHECK: a:
-; CHECK: %f = load float* %p, !tbaa [[TAGA:!.*]]
+; CHECK: %f = load float, float* %p, !tbaa [[TAGA:!.*]]
; CHECK: store float %f, float* %q
define void @foo(float* %p, i1 %c, float* %q, float* %r) {
- %f = load float* %p, !tbaa !0
+ %f = load float, float* %p, !tbaa !0
store float 0.0, float* %r, !tbaa !1
br i1 %c, label %a, label %b
a:
diff --git a/test/Analysis/TypeBasedAliasAnalysis/tbaa-path.ll b/test/Analysis/TypeBasedAliasAnalysis/tbaa-path.ll
index 3c035af..a2e4dc6 100644
--- a/test/Analysis/TypeBasedAliasAnalysis/tbaa-path.ll
+++ b/test/Analysis/TypeBasedAliasAnalysis/tbaa-path.ll
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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,24 +340,24 @@ 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
}