diff options
author | Manman Ren <manman.ren@gmail.com> | 2013-09-30 18:17:55 +0000 |
---|---|---|
committer | Manman Ren <manman.ren@gmail.com> | 2013-09-30 18:17:55 +0000 |
commit | e267f04ef577781f8551a1514f5a781d6a860a2c (patch) | |
tree | b9716616e86ed6c3303e50e7fab07ac406402813 /test/Transforms | |
parent | aef1b378242dee5f17e440344258460e1dedbb4b (diff) | |
download | external_llvm-e267f04ef577781f8551a1514f5a781d6a860a2c.zip external_llvm-e267f04ef577781f8551a1514f5a781d6a860a2c.tar.gz external_llvm-e267f04ef577781f8551a1514f5a781d6a860a2c.tar.bz2 |
TBAA: update tbaa format from scalar format to struct-path aware format.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191690 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r-- | test/Transforms/GVN/cond_br2.ll | 29 | ||||
-rw-r--r-- | test/Transforms/LoopVectorize/scev-exitlim-crash.ll | 21 | ||||
-rw-r--r-- | test/Transforms/SLPVectorizer/X86/pr16899.ll | 9 |
3 files changed, 31 insertions, 28 deletions
diff --git a/test/Transforms/GVN/cond_br2.ll b/test/Transforms/GVN/cond_br2.ll index e0ef39d..27e6f75 100644 --- a/test/Transforms/GVN/cond_br2.ll +++ b/test/Transforms/GVN/cond_br2.ll @@ -22,15 +22,15 @@ entry: %BeginX.i.i.i.i.i.i = getelementptr inbounds %"class.llvm::SmallVector"* %sv, i64 0, i32 0, i32 0, i32 0, i32 0, i32 0 %FirstEl.i.i.i.i.i.i = getelementptr inbounds %"class.llvm::SmallVector"* %sv, i64 0, i32 0, i32 0, i32 0, i32 0, i32 3 %1 = bitcast %"union.llvm::SmallVectorBase::U"* %FirstEl.i.i.i.i.i.i to i8* - store i8* %1, i8** %BeginX.i.i.i.i.i.i, align 16, !tbaa !0 + store i8* %1, i8** %BeginX.i.i.i.i.i.i, align 16, !tbaa !4 %EndX.i.i.i.i.i.i = getelementptr inbounds %"class.llvm::SmallVector"* %sv, i64 0, i32 0, i32 0, i32 0, i32 0, i32 1 - store i8* %1, i8** %EndX.i.i.i.i.i.i, align 8, !tbaa !0 + store i8* %1, i8** %EndX.i.i.i.i.i.i, align 8, !tbaa !4 %CapacityX.i.i.i.i.i.i = getelementptr inbounds %"class.llvm::SmallVector"* %sv, i64 0, i32 0, i32 0, i32 0, i32 0, i32 2 %add.ptr.i.i.i.i2.i.i = getelementptr inbounds %"union.llvm::SmallVectorBase::U"* %FirstEl.i.i.i.i.i.i, i64 2 %add.ptr.i.i.i.i.i.i = bitcast %"union.llvm::SmallVectorBase::U"* %add.ptr.i.i.i.i2.i.i to i8* - store i8* %add.ptr.i.i.i.i.i.i, i8** %CapacityX.i.i.i.i.i.i, align 16, !tbaa !0 + store i8* %add.ptr.i.i.i.i.i.i, i8** %CapacityX.i.i.i.i.i.i, align 16, !tbaa !4 %EndX.i = getelementptr inbounds %"class.llvm::SmallVector"* %sv, i64 0, i32 0, i32 0, i32 0, i32 0, i32 1 - %2 = load i8** %EndX.i, align 8, !tbaa !0 + %2 = load i8** %EndX.i, align 8, !tbaa !4 %CapacityX.i = getelementptr inbounds %"class.llvm::SmallVector"* %sv, i64 0, i32 0, i32 0, i32 0, i32 0, i32 2 %cmp.i = icmp ult i8* %2, %add.ptr.i.i.i.i.i.i br i1 %cmp.i, label %Retry.i, label %if.end.i @@ -42,7 +42,7 @@ Retry.i: ; preds = %.noexc, %entry new.notnull.i: ; preds = %Retry.i %4 = bitcast i8* %3 to i32* - store i32 1, i32* %4, align 4, !tbaa !3 + store i32 1, i32* %4, align 4, !tbaa !5 br label %invoke.cont if.end.i: ; preds = %entry @@ -51,25 +51,25 @@ if.end.i: ; preds = %entry to label %.noexc unwind label %lpad .noexc: ; preds = %if.end.i - %.pre.i = load i8** %EndX.i, align 8, !tbaa !0 + %.pre.i = load i8** %EndX.i, align 8, !tbaa !4 br label %Retry.i invoke.cont: ; preds = %new.notnull.i, %Retry.i %add.ptr.i = getelementptr inbounds i8* %3, i64 4 - store i8* %add.ptr.i, i8** %EndX.i, align 8, !tbaa !0 - %6 = load i8** %CapacityX.i, align 16, !tbaa !0 + store i8* %add.ptr.i, i8** %EndX.i, align 8, !tbaa !4 + %6 = load i8** %CapacityX.i, align 16, !tbaa !4 %cmp.i8 = icmp ult i8* %add.ptr.i, %6 br i1 %cmp.i8, label %new.notnull.i11, label %if.end.i14 Retry.i10: ; preds = %if.end.i14 - %.pre.i13 = load i8** %EndX.i, align 8, !tbaa !0 + %.pre.i13 = load i8** %EndX.i, align 8, !tbaa !4 %new.isnull.i9 = icmp eq i8* %.pre.i13, null br i1 %new.isnull.i9, label %invoke.cont2, label %new.notnull.i11 new.notnull.i11: ; preds = %invoke.cont, %Retry.i10 %7 = phi i8* [ %.pre.i13, %Retry.i10 ], [ %add.ptr.i, %invoke.cont ] %8 = bitcast i8* %7 to i32* - store i32 2, i32* %8, align 4, !tbaa !3 + store i32 2, i32* %8, align 4, !tbaa !5 br label %invoke.cont2 if.end.i14: ; preds = %invoke.cont @@ -80,12 +80,12 @@ if.end.i14: ; preds = %invoke.cont invoke.cont2: ; preds = %new.notnull.i11, %Retry.i10 %10 = phi i8* [ null, %Retry.i10 ], [ %7, %new.notnull.i11 ] %add.ptr.i12 = getelementptr inbounds i8* %10, i64 4 - store i8* %add.ptr.i12, i8** %EndX.i, align 8, !tbaa !0 + store i8* %add.ptr.i12, i8** %EndX.i, align 8, !tbaa !4 invoke void @_Z1gRN4llvm11SmallVectorIiLj8EEE(%"class.llvm::SmallVector"* %sv) to label %invoke.cont3 unwind label %lpad invoke.cont3: ; preds = %invoke.cont2 - %11 = load i8** %BeginX.i.i.i.i.i.i, align 16, !tbaa !0 + %11 = load i8** %BeginX.i.i.i.i.i.i, align 16, !tbaa !4 %cmp.i.i.i.i19 = icmp eq i8* %11, %1 br i1 %cmp.i.i.i.i19, label %_ZN4llvm11SmallVectorIiLj8EED1Ev.exit21, label %if.then.i.i.i20 @@ -100,7 +100,7 @@ _ZN4llvm11SmallVectorIiLj8EED1Ev.exit21: ; preds = %invoke.cont3, %if.t lpad: ; preds = %if.end.i14, %if.end.i, %invoke.cont2 %12 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) cleanup - %13 = load i8** %BeginX.i.i.i.i.i.i, align 16, !tbaa !0 + %13 = load i8** %BeginX.i.i.i.i.i.i, align 16, !tbaa !4 %cmp.i.i.i.i = icmp eq i8* %13, %1 br i1 %cmp.i.i.i.i, label %eh.resume, label %if.then.i.i.i @@ -136,4 +136,5 @@ attributes #3 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"= !1 = metadata !{metadata !"omnipotent char", metadata !2} !2 = metadata !{metadata !"Simple C/C++ TBAA"} !3 = metadata !{metadata !"int", metadata !1} - +!4 = metadata !{metadata !0, metadata !0, i64 0} +!5 = metadata !{metadata !3, metadata !3, i64 0} diff --git a/test/Transforms/LoopVectorize/scev-exitlim-crash.ll b/test/Transforms/LoopVectorize/scev-exitlim-crash.ll index 7687738..2536a46 100644 --- a/test/Transforms/LoopVectorize/scev-exitlim-crash.ll +++ b/test/Transforms/LoopVectorize/scev-exitlim-crash.ll @@ -29,14 +29,14 @@ for.cond4.preheader: ; preds = %for.cond br i1 %cmp514, label %for.cond7.preheader.lr.ph, label %for.end26 for.cond7.preheader.lr.ph: ; preds = %for.cond4.preheader - %0 = load i32** @e, align 8, !tbaa !0 + %0 = load i32** @e, align 8, !tbaa !4 br label %for.cond7.preheader for.cond7.preheader: ; preds = %for.cond7.preheader.lr.ph, %for.inc23 %y.017 = phi i32 [ 0, %for.cond7.preheader.lr.ph ], [ %inc24, %for.inc23 ] %i.116 = phi i32 [ 0, %for.cond7.preheader.lr.ph ], [ %i.2.lcssa, %for.inc23 ] %n.015 = phi i32 [ undef, %for.cond7.preheader.lr.ph ], [ %inc25, %for.inc23 ] - %1 = load i32* @b, align 4, !tbaa !3 + %1 = load i32* @b, align 4, !tbaa !5 %tobool11 = icmp eq i32 %1, 0 br i1 %tobool11, label %for.inc23, label %for.body8.lr.ph @@ -49,7 +49,7 @@ for.body8: ; preds = %for.body8.lr.ph, %f %i.213 = phi i32 [ %i.116, %for.body8.lr.ph ], [ 0, %for.inc19 ] %2 = trunc i64 %indvars.iv19 to i32 %add10 = add i32 %add9, %2 - store i32 %add10, i32* @f, align 4, !tbaa !3 + store i32 %add10, i32* @f, align 4, !tbaa !5 %idx.ext = sext i32 %add10 to i64 %add.ptr = getelementptr inbounds i32* @a, i64 %idx.ext %tobool129 = icmp eq i32 %i.213, 0 @@ -63,9 +63,9 @@ for.body13: ; preds = %for.body13.lr.ph, % %indvars.iv = phi i64 [ %3, %for.body13.lr.ph ], [ %indvars.iv.next, %for.body13 ] %add.ptr.sum = add i64 %idx.ext, %indvars.iv %arrayidx = getelementptr inbounds i32* @a, i64 %add.ptr.sum - %4 = load i32* %arrayidx, align 4, !tbaa !3 + %4 = load i32* %arrayidx, align 4, !tbaa !5 %arrayidx15 = getelementptr inbounds i32* %0, i64 %indvars.iv - store i32 %4, i32* %arrayidx15, align 4, !tbaa !3 + store i32 %4, i32* %arrayidx15, align 4, !tbaa !5 %indvars.iv.next = add i64 %indvars.iv, 1 %5 = trunc i64 %indvars.iv.next to i32 %tobool12 = icmp eq i32 %5, 0 @@ -75,17 +75,17 @@ for.cond11.for.inc19_crit_edge: ; preds = %for.body13 br label %for.inc19 for.inc19: ; preds = %for.cond11.for.inc19_crit_edge, %for.body8 - %6 = load i32* @c, align 4, !tbaa !3 + %6 = load i32* @c, align 4, !tbaa !5 %inc20 = add nsw i32 %6, 1 - store i32 %inc20, i32* @c, align 4, !tbaa !3 + store i32 %inc20, i32* @c, align 4, !tbaa !5 %indvars.iv.next20 = add i64 %indvars.iv19, 1 - %7 = load i32* @b, align 4, !tbaa !3 + %7 = load i32* @b, align 4, !tbaa !5 %tobool = icmp eq i32 %7, 0 br i1 %tobool, label %for.cond7.for.inc23_crit_edge, label %for.body8 for.cond7.for.inc23_crit_edge: ; preds = %for.inc19 %add.ptr.lcssa = phi i32* [ %add.ptr, %for.inc19 ] - store i32* %add.ptr.lcssa, i32** @d, align 8, !tbaa !0 + store i32* %add.ptr.lcssa, i32** @d, align 8, !tbaa !4 br label %for.inc23 for.inc23: ; preds = %for.cond7.for.inc23_crit_edge, %for.cond7.preheader @@ -110,4 +110,5 @@ attributes #1 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "n !1 = metadata !{metadata !"omnipotent char", metadata !2} !2 = metadata !{metadata !"Simple C/C++ TBAA"} !3 = metadata !{metadata !"double", metadata !1} -!4 = metadata !{metadata !"any pointer", metadata !1} +!4 = metadata !{metadata !0, metadata !0, i64 0} +!5 = metadata !{metadata !3, metadata !3, i64 0} diff --git a/test/Transforms/SLPVectorizer/X86/pr16899.ll b/test/Transforms/SLPVectorizer/X86/pr16899.ll index d715239..8631bc9 100644 --- a/test/Transforms/SLPVectorizer/X86/pr16899.ll +++ b/test/Transforms/SLPVectorizer/X86/pr16899.ll @@ -7,10 +7,10 @@ target triple = "i386--netbsd" ; Function Attrs: noreturn nounwind readonly define i32 @fn1() #0 { entry: - %0 = load i32** @a, align 4, !tbaa !0 - %1 = load i32* %0, align 4, !tbaa !3 + %0 = load i32** @a, align 4, !tbaa !4 + %1 = load i32* %0, align 4, !tbaa !5 %arrayidx1 = getelementptr inbounds i32* %0, i32 1 - %2 = load i32* %arrayidx1, align 4, !tbaa !3 + %2 = load i32* %arrayidx1, align 4, !tbaa !5 br label %do.body do.body: ; preds = %do.body, %entry @@ -27,4 +27,5 @@ attributes #0 = { noreturn nounwind readonly "less-precise-fpmad"="false" "no-fr !1 = metadata !{metadata !"omnipotent char", metadata !2} !2 = metadata !{metadata !"Simple C/C++ TBAA"} !3 = metadata !{metadata !"int", metadata !1} - +!4 = metadata !{metadata !0, metadata !0, i64 0} +!5 = metadata !{metadata !3, metadata !3, i64 0} |