Skip to content

Commit

Permalink
TBAA: remove !tbaa from testing cases when they are not needed.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191689 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
manman-ren committed Sep 30, 2013
1 parent bdf8015 commit aef1b37
Show file tree
Hide file tree
Showing 20 changed files with 131 additions and 207 deletions.
16 changes: 6 additions & 10 deletions test/CodeGen/ARM/coalesce-dbgvalue.ll
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ target triple = "thumbv7-apple-ios3.0.0"
; Function Attrs: nounwind ssp
define i32 @pr16110() #0 {
for.cond1.preheader:
store i32 0, i32* @c, align 4, !dbg !21, !tbaa !23
store i32 0, i32* @c, align 4, !dbg !21
br label %for.cond1.outer, !dbg !26

for.cond1: ; preds = %for.end9, %for.cond1.outer
Expand All @@ -26,9 +26,9 @@ for.cond1: ; preds = %for.end9, %for.cond
br i1 %cmp, label %for.body2, label %for.end9, !dbg !26

for.body2: ; preds = %for.cond1
store i32 %storemerge11, i32* @b, align 4, !dbg !26, !tbaa !23
store i32 %storemerge11, i32* @b, align 4, !dbg !26
tail call void @llvm.dbg.value(metadata !27, i64 0, metadata !11), !dbg !28
%0 = load i64* @a, align 8, !dbg !29, !tbaa !30
%0 = load i64* @a, align 8, !dbg !29
%xor = xor i64 %0, %e.1.ph, !dbg !29
%conv3 = trunc i64 %xor to i32, !dbg !29
tail call void @llvm.dbg.value(metadata !{i32 %conv3}, i64 0, metadata !10), !dbg !29
Expand All @@ -44,23 +44,23 @@ land.end: ; preds = %land.rhs, %for.body
%1 = phi i1 [ false, %for.body2 ], [ %tobool5, %land.rhs ]
%land.ext = zext i1 %1 to i32
%call6 = tail call i32 bitcast (i32 (...)* @fn2 to i32 (i32, i32*)*)(i32 %land.ext, i32* null) #3
%2 = load i32* @b, align 4, !dbg !26, !tbaa !23
%2 = load i32* @b, align 4, !dbg !26
%inc8 = add nsw i32 %2, 1, !dbg !26
%phitmp = and i64 %xor, 4294967295, !dbg !26
br label %for.cond1.outer, !dbg !26

for.cond1.outer: ; preds = %land.end, %for.cond1.preheader
%storemerge11.ph = phi i32 [ %inc8, %land.end ], [ 0, %for.cond1.preheader ]
%e.1.ph = phi i64 [ %phitmp, %land.end ], [ 0, %for.cond1.preheader ]
%3 = load i32* @d, align 4, !dbg !31, !tbaa !23
%3 = load i32* @d, align 4, !dbg !31
%tobool10 = icmp eq i32 %3, 0, !dbg !31
br label %for.cond1

for.end9: ; preds = %for.cond1
br i1 %tobool10, label %if.end, label %for.cond1, !dbg !31

if.end: ; preds = %for.end9
store i32 %storemerge11, i32* @b, align 4, !dbg !26, !tbaa !23
store i32 %storemerge11, i32* @b, align 4, !dbg !26
ret i32 0, !dbg !32
}

Expand Down Expand Up @@ -101,13 +101,9 @@ attributes #3 = { nounwind }
!20 = metadata !{i32 786484, i32 0, null, metadata !"d", metadata !"d", metadata !"", metadata !5, i32 4, metadata !8, i32 0, i32 1, i32* @d, null} ; [ DW_TAG_variable ] [d] [line 4] [def]
!21 = metadata !{i32 10, i32 0, metadata !22, null}
!22 = metadata !{i32 786443, metadata !1, metadata !4, i32 10, i32 0, i32 0} ; [ DW_TAG_lexical_block ] [/d/b/pr16110.c]
!23 = metadata !{metadata !"int", metadata !24}
!24 = metadata !{metadata !"omnipotent char", metadata !25}
!25 = metadata !{metadata !"Simple C/C++ TBAA"}
!26 = metadata !{i32 12, i32 0, metadata !13, null}
!27 = metadata !{i32* null}
!28 = metadata !{i32 13, i32 0, metadata !12, null}
!29 = metadata !{i32 14, i32 0, metadata !12, null}
!30 = metadata !{metadata !"long long", metadata !24}
!31 = metadata !{i32 16, i32 0, metadata !4, null}
!32 = metadata !{i32 18, i32 0, metadata !4, null}
6 changes: 1 addition & 5 deletions test/CodeGen/ARM/misched-copy-arm.ll
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ if.end28: ; preds = %if.then24, %while.c
%dst.1 = phi %struct.rtx_def* [ undef, %if.then24 ], [ %dst.0, %while.cond ], [ %dst.0, %while.cond ]
%arrayidx30 = getelementptr inbounds %struct.rtx_def* %dst.1, i32 0, i32 1, i32 0
%rtx31 = bitcast %union.rtunion_def* %arrayidx30 to %struct.rtx_def**
%0 = load %struct.rtx_def** %rtx31, align 4, !tbaa !0
%0 = load %struct.rtx_def** %rtx31, align 4
br label %while.cond

if.then46: ; preds = %while.cond
Expand All @@ -77,7 +77,3 @@ if.end47: ; preds = %while.cond
}

attributes #0 = { nounwind ssp }

!0 = metadata !{metadata !"any pointer", metadata !1}
!1 = metadata !{metadata !"omnipotent char", metadata !2}
!2 = metadata !{metadata !"Simple C/C++ TBAA"}
50 changes: 22 additions & 28 deletions test/CodeGen/ARM/struct-byval-frame-index.ll
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ declare void @SetMotionVectorsMB(%structK* nocapture, i32) #1
; Function Attrs: nounwind
define void @set_stored_macroblock_parameters() #1 {
entry:
%0 = load %structB** @img, align 4, !tbaa !0
%1 = load i32* undef, align 4, !tbaa !3
%0 = load %structB** @img, align 4
%1 = load i32* undef, align 4
%mb_data = getelementptr inbounds %structB* %0, i32 0, i32 61
%2 = load %structK** %mb_data, align 4, !tbaa !0
%2 = load %structK** %mb_data, align 4
br label %for.body

for.body: ; preds = %for.body, %entry
Expand Down Expand Up @@ -109,7 +109,7 @@ for.body119: ; preds = %for.body119, %for.c
br i1 undef, label %for.body119, label %if.end164

if.end164: ; preds = %for.body119, %for.cond47.preheader, %if.end43
store i32*** null, i32**** @cofDC, align 4, !tbaa !0
store i32*** null, i32**** @cofDC, align 4
%mb_type = getelementptr inbounds %structK* %2, i32 %1, i32 8
br i1 undef, label %if.end230, label %if.then169

Expand All @@ -134,7 +134,7 @@ if.then233: ; preds = %if.end230

if.end236: ; preds = %if.end230
%cmp242 = icmp ne i16 undef, 8
%4 = load i32* @luma_transform_size_8x8_flag, align 4, !tbaa !3
%4 = load i32* @luma_transform_size_8x8_flag, align 4
%tobool245 = icmp ne i32 %4, 0
%or.cond812 = or i1 %cmp242, %tobool245
br i1 %or.cond812, label %if.end249, label %land.lhs.true246
Expand All @@ -150,48 +150,48 @@ if.then248: ; preds = %land.lhs.true246
br label %if.end249

if.end249: ; preds = %if.then248, %land.lhs.true246, %if.end236
%5 = load i32* @luma_transform_size_8x8_flag, align 4, !tbaa !3
%6 = load %structA** @rdopt, align 4, !tbaa !0
%5 = load i32* @luma_transform_size_8x8_flag, align 4
%6 = load %structA** @rdopt, align 4
%luma_transform_size_8x8_flag264 = getelementptr inbounds %structA* %6, i32 0, i32 21
store i32 %5, i32* %luma_transform_size_8x8_flag264, align 4, !tbaa !3
%7 = load i32* undef, align 4, !tbaa !3
store i32 %5, i32* %luma_transform_size_8x8_flag264, align 4
%7 = load i32* undef, align 4
%add281 = add nsw i32 %7, 0
br label %for.body285

for.body285: ; preds = %for.inc503, %if.end249
%8 = phi %structB* [ undef, %if.end249 ], [ %.pre1155, %for.inc503 ]
%i.21103 = phi i32 [ 0, %if.end249 ], [ %inc504, %for.inc503 ]
%block_x286 = getelementptr inbounds %structB* %8, i32 0, i32 37
%9 = load i32* %block_x286, align 4, !tbaa !3
%9 = load i32* %block_x286, align 4
%add287 = add nsw i32 %9, %i.21103
%shr289 = ashr i32 %i.21103, 1
%add290 = add nsw i32 %shr289, 0
%arrayidx292 = getelementptr inbounds %structK* %2, i32 %1, i32 15, i32 %add290
%10 = load %structM** @enc_picture, align 4, !tbaa !0
%10 = load %structM** @enc_picture, align 4
%ref_idx = getelementptr inbounds %structM* %10, i32 0, i32 35
%11 = load i8**** %ref_idx, align 4, !tbaa !0
%12 = load i8*** %11, align 4, !tbaa !0
%11 = load i8**** %ref_idx, align 4
%12 = load i8*** %11, align 4
%arrayidx313 = getelementptr inbounds i8** %12, i32 %add281
%13 = load i8** %arrayidx313, align 4, !tbaa !0
%13 = load i8** %arrayidx313, align 4
%arrayidx314 = getelementptr inbounds i8* %13, i32 %add287
store i8 -1, i8* %arrayidx314, align 1, !tbaa !1
%14 = load %structB** @img, align 4, !tbaa !0
store i8 -1, i8* %arrayidx314, align 1
%14 = load %structB** @img, align 4
%MbaffFrameFlag327 = getelementptr inbounds %structB* %14, i32 0, i32 100
%15 = load i32* %MbaffFrameFlag327, align 4, !tbaa !3
%15 = load i32* %MbaffFrameFlag327, align 4
%tobool328 = icmp eq i32 %15, 0
br i1 %tobool328, label %if.end454, label %if.then329

if.then329: ; preds = %for.body285
%16 = load %structA** @rdopt, align 4, !tbaa !0
%16 = load %structA** @rdopt, align 4
br label %if.end454

if.end454: ; preds = %if.then329, %for.body285
%17 = load i32* %arrayidx292, align 4, !tbaa !3
%17 = load i32* %arrayidx292, align 4
%cmp457 = icmp eq i32 %17, 0
br i1 %cmp457, label %if.then475, label %lor.lhs.false459

lor.lhs.false459: ; preds = %if.end454
%18 = load i32* %mb_type, align 4, !tbaa !3
%18 = load i32* %mb_type, align 4
switch i32 %18, label %for.inc503 [
i32 9, label %if.then475
i32 10, label %if.then475
Expand All @@ -200,12 +200,12 @@ lor.lhs.false459: ; preds = %if.end454
]

if.then475: ; preds = %lor.lhs.false459, %lor.lhs.false459, %lor.lhs.false459, %lor.lhs.false459, %if.end454
store i16 0, i16* undef, align 2, !tbaa !4
store i16 0, i16* undef, align 2
br label %for.inc503

for.inc503: ; preds = %if.then475, %lor.lhs.false459
%inc504 = add nsw i32 %i.21103, 1
%.pre1155 = load %structB** @img, align 4, !tbaa !0
%.pre1155 = load %structB** @img, align 4
br label %for.body285
}

Expand All @@ -217,9 +217,3 @@ declare void @RestoreMVBlock8x8(i32, i32, %structN* byval nocapture, i32) #1

attributes #0 = { nounwind }
attributes #1 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }

!0 = metadata !{metadata !"any pointer", metadata !1}
!1 = metadata !{metadata !"omnipotent char", metadata !2}
!2 = metadata !{metadata !"Simple C/C++ TBAA"}
!3 = metadata !{metadata !"int", metadata !1}
!4 = metadata !{metadata !"short", metadata !1}
5 changes: 1 addition & 4 deletions test/CodeGen/Hexagon/BranchPredict.ll
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ return: ; preds = %if.else, %if.then
define i32 @foo_bar(i32 %a, i16 signext %b) nounwind {
; CHECK: if{{ *}}(!cmp.eq(r{{[0-9]*}}.new, #0)) jump:nt
entry:
%0 = load i32* @j, align 4, !tbaa !2
%0 = load i32* @j, align 4
%tobool = icmp eq i32 %0, 0
br i1 %tobool, label %if.else, label %if.then, !prof !0

Expand All @@ -74,6 +74,3 @@ return: ; preds = %if.else, %if.then

!0 = metadata !{metadata !"branch_weights", i32 64, i32 4}
!1 = metadata !{metadata !"branch_weights", i32 4, i32 64}
!2 = metadata !{metadata !"int", metadata !3}
!3 = metadata !{metadata !"omnipotent char", metadata !4}
!4 = metadata !{metadata !"Simple C/C++ TBAA"}
8 changes: 2 additions & 6 deletions test/CodeGen/Hexagon/union-1.ll
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

define void @word(i32* nocapture %a) nounwind {
entry:
%0 = load i32* %a, align 4, !tbaa !0
%0 = load i32* %a, align 4
%1 = zext i32 %0 to i64
%add.ptr = getelementptr inbounds i32* %a, i32 1
%2 = load i32* %add.ptr, align 4, !tbaa !0
%2 = load i32* %add.ptr, align 4
%3 = zext i32 %2 to i64
%4 = shl nuw i64 %3, 32
%ins = or i64 %4, %1
Expand All @@ -17,7 +17,3 @@ entry:
}

declare void @bar(i64)

!0 = metadata !{metadata !"int", metadata !1}
!1 = metadata !{metadata !"omnipotent char", metadata !2}
!2 = metadata !{metadata !"Simple C/C++ TBAA"}
8 changes: 2 additions & 6 deletions test/CodeGen/Mips/cmplarge.ll
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ target triple = "mipsel--linux-gnu"
define void @getSubImagesLuma(%struct.StorablePicture* nocapture %s) #0 {
entry:
%size_y = getelementptr inbounds %struct.StorablePicture* %s, i32 0, i32 1
%0 = load i32* %size_y, align 4, !tbaa !0
%0 = load i32* %size_y, align 4
%sub = add nsw i32 %0, -1
%add5 = add nsw i32 %0, 20
%cmp6 = icmp sgt i32 %add5, -20
Expand All @@ -20,7 +20,7 @@ for.body: ; preds = %entry, %for.body
%j.07 = phi i32 [ %inc, %for.body ], [ -20, %entry ]
%call = tail call i32 bitcast (i32 (...)* @iClip3 to i32 (i32, i32, i32)*)(i32 0, i32 %sub, i32 %j.07) #2
%inc = add nsw i32 %j.07, 1
%1 = load i32* %size_y, align 4, !tbaa !0
%1 = load i32* %size_y, align 4
%add = add nsw i32 %1, 20
%cmp = icmp slt i32 %inc, %add
br i1 %cmp, label %for.body, label %for.end
Expand All @@ -36,7 +36,3 @@ declare i32 @iClip3(...) #1
attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #1 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #2 = { nounwind }

!0 = metadata !{metadata !"int", metadata !1}
!1 = metadata !{metadata !"omnipotent char", metadata !2}
!2 = metadata !{metadata !"Simple C/C++ TBAA"}
12 changes: 4 additions & 8 deletions test/CodeGen/PowerPC/dyn-alloca-aligned.ll
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ entry:
%vla = alloca i32, i64 %0, align 128
%vla1 = alloca i32, i64 %0, align 128
%a2 = getelementptr inbounds %struct.s* %a, i64 0, i32 0
%1 = load i32* %a2, align 4, !tbaa !0
store i32 %1, i32* %vla1, align 128, !tbaa !0
%1 = load i32* %a2, align 4
store i32 %1, i32* %vla1, align 128
%b = getelementptr inbounds %struct.s* %a, i64 0, i32 1
%2 = load i32* %b, align 4, !tbaa !0
%2 = load i32* %b, align 4
%arrayidx3 = getelementptr inbounds i32* %vla1, i64 1
store i32 %2, i32* %arrayidx3, align 4, !tbaa !0
store i32 %2, i32* %arrayidx3, align 4
call void @bar(i32* %vla1, i32* %vla) #0
ret void

Expand All @@ -33,7 +33,3 @@ entry:
}

attributes #0 = { nounwind }

!0 = metadata !{metadata !"int", metadata !1}
!1 = metadata !{metadata !"omnipotent char", metadata !2}
!2 = metadata !{metadata !"Simple C/C++ TBAA"}
6 changes: 1 addition & 5 deletions test/CodeGen/PowerPC/isel-rc-nox0.ll
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ crc32_gentab.exit: ; preds = %for.cond1.preheader

for.cond1.preheader.i2961.i: ; preds = %for.inc44.i2977.i, %crc32_gentab.exit
call void @llvm.memset.p0i8.i64(i8* bitcast ([1 x [9 x i32]]* @g_62 to i8*), i8 -1, i64 36, i32 4, i1 false) #1
%0 = load i32* %retval.0.i.i.i, align 4, !tbaa !0
%0 = load i32* %retval.0.i.i.i, align 4
%tobool.i2967.i = icmp eq i32 %0, 0
br label %for.body21.i2968.i

Expand All @@ -44,7 +44,3 @@ declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) #1

attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "ssp-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #1 = { nounwind }

!0 = metadata !{metadata !"int", metadata !1}
!1 = metadata !{metadata !"omnipotent char", metadata !2}
!2 = metadata !{metadata !"Simple C/C++ TBAA"}
28 changes: 12 additions & 16 deletions test/CodeGen/PowerPC/stack-realign.ll
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ define void @goo(%struct.s* byval nocapture readonly %a) {
entry:
%x = alloca [2 x i32], align 32
%a1 = getelementptr inbounds %struct.s* %a, i64 0, i32 0
%0 = load i32* %a1, align 4, !tbaa !0
%0 = load i32* %a1, align 4
%arrayidx = getelementptr inbounds [2 x i32]* %x, i64 0, i64 0
store i32 %0, i32* %arrayidx, align 32, !tbaa !0
store i32 %0, i32* %arrayidx, align 32
%b = getelementptr inbounds %struct.s* %a, i64 0, i32 1
%1 = load i32* %b, align 4, !tbaa !0
%1 = load i32* %b, align 4
%arrayidx2 = getelementptr inbounds [2 x i32]* %x, i64 0, i64 1
store i32 %1, i32* %arrayidx2, align 4, !tbaa !0
store i32 %1, i32* %arrayidx2, align 4
call void @bar(i32* %arrayidx)
ret void
}
Expand Down Expand Up @@ -74,13 +74,13 @@ define void @hoo(%struct.s* byval nocapture readonly %a) {
entry:
%x = alloca [200000 x i32], align 32
%a1 = getelementptr inbounds %struct.s* %a, i64 0, i32 0
%0 = load i32* %a1, align 4, !tbaa !0
%0 = load i32* %a1, align 4
%arrayidx = getelementptr inbounds [200000 x i32]* %x, i64 0, i64 0
store i32 %0, i32* %arrayidx, align 32, !tbaa !0
store i32 %0, i32* %arrayidx, align 32
%b = getelementptr inbounds %struct.s* %a, i64 0, i32 1
%1 = load i32* %b, align 4, !tbaa !0
%1 = load i32* %b, align 4
%arrayidx2 = getelementptr inbounds [200000 x i32]* %x, i64 0, i64 1
store i32 %1, i32* %arrayidx2, align 4, !tbaa !0
store i32 %1, i32* %arrayidx2, align 4
call void @bar(i32* %arrayidx)
ret void
}
Expand All @@ -105,13 +105,13 @@ define void @loo(%struct.s* byval nocapture readonly %a) {
entry:
%x = alloca [2 x i32], align 32
%a1 = getelementptr inbounds %struct.s* %a, i64 0, i32 0
%0 = load i32* %a1, align 4, !tbaa !0
%0 = load i32* %a1, align 4
%arrayidx = getelementptr inbounds [2 x i32]* %x, i64 0, i64 0
store i32 %0, i32* %arrayidx, align 32, !tbaa !0
store i32 %0, i32* %arrayidx, align 32
%b = getelementptr inbounds %struct.s* %a, i64 0, i32 1
%1 = load i32* %b, align 4, !tbaa !0
%1 = load i32* %b, align 4
%arrayidx2 = getelementptr inbounds [2 x i32]* %x, i64 0, i64 1
store i32 %1, i32* %arrayidx2, align 4, !tbaa !0
store i32 %1, i32* %arrayidx2, align 4
call void @bar(i32* %arrayidx)
call void asm sideeffect "", "~{f30}"() nounwind
ret void
Expand Down Expand Up @@ -145,7 +145,3 @@ entry:
; CHECK-FP: stfd 30, -16(30)

; CHECK-FP: blr

!0 = metadata !{metadata !"int", metadata !1}
!1 = metadata !{metadata !"omnipotent char", metadata !2}
!2 = metadata !{metadata !"Simple C/C++ TBAA"}
Loading

0 comments on commit aef1b37

Please sign in to comment.