mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-25 00:29:20 +00:00
TBAA: remove !tbaa from testing cases if not used.
This will make it easier to turn on struct-path aware TBAA since the metadata format will change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180743 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
26ebdd1e7c
commit
e78d832097
@ -10,10 +10,10 @@
|
||||
|
||||
define i32 @foo(i32* nocapture %p, i8* nocapture %q) {
|
||||
entry:
|
||||
%0 = load i32* %p, align 4, !tbaa !0, !invariant.load !3
|
||||
%0 = load i32* %p, align 4, !invariant.load !3
|
||||
%conv = trunc i32 %0 to i8
|
||||
store i8 %conv, i8* %q, align 1, !tbaa !1
|
||||
%1 = load i32* %p, align 4, !tbaa !0, !invariant.load !3
|
||||
store i8 %conv, i8* %q, align 1
|
||||
%1 = load i32* %p, align 4, !invariant.load !3
|
||||
%add = add nsw i32 %1, 1
|
||||
ret i32 %add
|
||||
|
||||
@ -23,7 +23,4 @@ entry:
|
||||
; CHECK: %add = add nsw i32 %0, 1
|
||||
}
|
||||
|
||||
!0 = metadata !{metadata !"int", metadata !1}
|
||||
!1 = metadata !{metadata !"omnipotent char", metadata !2}
|
||||
!2 = metadata !{metadata !"Simple C/C++ TBAA"}
|
||||
!3 = metadata !{}
|
||||
|
@ -24,23 +24,23 @@ for.body4: ; preds = %for.body4, %for.con
|
||||
%lsr.iv46 = bitcast [16000 x double]* %lsr.iv4 to <4 x double>*
|
||||
%lsr.iv12 = bitcast [16000 x double]* %lsr.iv1 to <4 x double>*
|
||||
%scevgep11 = getelementptr <4 x double>* %lsr.iv46, i64 -2
|
||||
%i6 = load <4 x double>* %scevgep11, align 32, !tbaa !0
|
||||
%i6 = load <4 x double>* %scevgep11, align 32
|
||||
%add = fadd <4 x double> %i6, <double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00>
|
||||
store <4 x double> %add, <4 x double>* %lsr.iv12, align 32, !tbaa !0
|
||||
store <4 x double> %add, <4 x double>* %lsr.iv12, align 32
|
||||
%scevgep10 = getelementptr <4 x double>* %lsr.iv46, i64 -1
|
||||
%i7 = load <4 x double>* %scevgep10, align 32, !tbaa !0
|
||||
%i7 = load <4 x double>* %scevgep10, align 32
|
||||
%add.4 = fadd <4 x double> %i7, <double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00>
|
||||
%scevgep9 = getelementptr <4 x double>* %lsr.iv12, i64 1
|
||||
store <4 x double> %add.4, <4 x double>* %scevgep9, align 32, !tbaa !0
|
||||
%i8 = load <4 x double>* %lsr.iv46, align 32, !tbaa !0
|
||||
store <4 x double> %add.4, <4 x double>* %scevgep9, align 32
|
||||
%i8 = load <4 x double>* %lsr.iv46, align 32
|
||||
%add.8 = fadd <4 x double> %i8, <double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00>
|
||||
%scevgep8 = getelementptr <4 x double>* %lsr.iv12, i64 2
|
||||
store <4 x double> %add.8, <4 x double>* %scevgep8, align 32, !tbaa !0
|
||||
store <4 x double> %add.8, <4 x double>* %scevgep8, align 32
|
||||
%scevgep7 = getelementptr <4 x double>* %lsr.iv46, i64 1
|
||||
%i9 = load <4 x double>* %scevgep7, align 32, !tbaa !0
|
||||
%i9 = load <4 x double>* %scevgep7, align 32
|
||||
%add.12 = fadd <4 x double> %i9, <double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00>
|
||||
%scevgep3 = getelementptr <4 x double>* %lsr.iv12, i64 3
|
||||
store <4 x double> %add.12, <4 x double>* %scevgep3, align 32, !tbaa !0
|
||||
store <4 x double> %add.12, <4 x double>* %scevgep3, align 32
|
||||
|
||||
; CHECK: NoAlias:{{[ \t]+}}<4 x double>* %scevgep11, <4 x double>* %scevgep7
|
||||
; CHECK: NoAlias:{{[ \t]+}}<4 x double>* %scevgep10, <4 x double>* %scevgep7
|
||||
@ -65,7 +65,3 @@ for.end: ; preds = %for.body4
|
||||
for.end10: ; preds = %for.end
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
!0 = metadata !{metadata !"double", metadata !1}
|
||||
!1 = metadata !{metadata !"omnipotent char", metadata !2}
|
||||
!2 = metadata !{metadata !"Simple C/C++ TBAA"}
|
||||
|
@ -20,10 +20,10 @@ vector.body: ; preds = %vector.body, %vecto
|
||||
;CHECK: cost of 1 {{.*}} extract
|
||||
%6 = extractelement <2 x i64> %3, i32 1
|
||||
%7 = getelementptr inbounds i32* %A, i64 %6
|
||||
%8 = load i32* %5, align 4, !tbaa !0
|
||||
%8 = load i32* %5, align 4
|
||||
;CHECK: cost of 1 {{.*}} insert
|
||||
%9 = insertelement <2 x i32> undef, i32 %8, i32 0
|
||||
%10 = load i32* %7, align 4, !tbaa !0
|
||||
%10 = load i32* %7, align 4
|
||||
;CHECK: cost of 1 {{.*}} insert
|
||||
%11 = insertelement <2 x i32> %9, i32 %10, i32 1
|
||||
%12 = add nsw <2 x i32> %11, %vec.phi
|
||||
@ -37,7 +37,3 @@ for.end: ; preds = %vector.body
|
||||
%16 = add i32 %14, %15
|
||||
ret i32 %16
|
||||
}
|
||||
|
||||
!0 = metadata !{metadata !"int", metadata !1}
|
||||
!1 = metadata !{metadata !"omnipotent char", metadata !2}
|
||||
!2 = metadata !{metadata !"Simple C/C++ TBAA"}
|
||||
|
@ -54,14 +54,14 @@ for.body: ; preds = %middle.block, %for.
|
||||
%13 = add nsw i64 %indvars.iv, 2
|
||||
%arrayidx = getelementptr inbounds i32* %B, i64 %13
|
||||
;CHECK: cost of 1 {{.*}} load
|
||||
%14 = load i32* %arrayidx, align 4, !tbaa !0
|
||||
%14 = load i32* %arrayidx, align 4
|
||||
;CHECK: cost of 1 {{.*}} mul
|
||||
%mul = mul nsw i32 %14, 5
|
||||
%arrayidx2 = getelementptr inbounds i32* %A, i64 %indvars.iv
|
||||
;CHECK: cost of 1 {{.*}} load
|
||||
%15 = load i32* %arrayidx2, align 4, !tbaa !0
|
||||
%15 = load i32* %arrayidx2, align 4
|
||||
%add3 = add nsw i32 %15, %mul
|
||||
store i32 %add3, i32* %arrayidx2, align 4, !tbaa !0
|
||||
store i32 %add3, i32* %arrayidx2, align 4
|
||||
%indvars.iv.next = add i64 %indvars.iv, 1
|
||||
;CHECK: cost of 0 {{.*}} trunc
|
||||
%16 = trunc i64 %indvars.iv.next to i32
|
||||
@ -73,7 +73,3 @@ for.end: ; preds = %middle.block, %for.
|
||||
;CHECK: cost of 0 {{.*}} ret
|
||||
ret i32 undef
|
||||
}
|
||||
|
||||
!0 = metadata !{metadata !"int", metadata !1}
|
||||
!1 = metadata !{metadata !"omnipotent char", metadata !2}
|
||||
!2 = metadata !{metadata !"Simple C/C++ TBAA"}
|
||||
|
@ -22,13 +22,9 @@ declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32,
|
||||
define i32 @main() nounwind uwtable ssp {
|
||||
main_entry:
|
||||
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* bitcast (%struct.anon* @b to i8*), i8* bitcast (%struct.anon* @a to i8*), i64 12, i32 4, i1 false)
|
||||
%0 = load volatile i32* getelementptr inbounds (%struct.anon* @b, i64 0, i32 0), align 4, !tbaa !0
|
||||
store i32 %0, i32* @c, align 4, !tbaa !0
|
||||
%0 = load volatile i32* getelementptr inbounds (%struct.anon* @b, i64 0, i32 0), align 4
|
||||
store i32 %0, i32* @c, align 4
|
||||
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* bitcast (%struct.anon* @b to i8*), i8* bitcast (%struct.anon* @a to i8*), i64 12, i32 4, i1 false) nounwind
|
||||
%call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8]* @.str, i64 0, i64 0), i32 %0) nounwind
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
!0 = metadata !{metadata !"int", metadata !1}
|
||||
!1 = metadata !{metadata !"omnipotent char", metadata !2}
|
||||
!2 = metadata !{metadata !"Simple C/C++ TBAA"}
|
||||
|
@ -15,24 +15,24 @@ entry:
|
||||
|
||||
lbl_818: ; preds = %for.end, %entry
|
||||
call void (...)* @func_27()
|
||||
store i32 0, i32* @g_814, align 4, !tbaa !0
|
||||
store i32 0, i32* @g_814, align 4
|
||||
br label %for.cond
|
||||
|
||||
for.cond: ; preds = %for.body, %lbl_818
|
||||
%0 = load i32* @g_814, align 4, !tbaa !0
|
||||
%0 = load i32* @g_814, align 4
|
||||
%cmp = icmp sle i32 %0, 0
|
||||
br i1 %cmp, label %for.body, label %for.end
|
||||
|
||||
for.body: ; preds = %for.cond
|
||||
%idxprom = sext i32 %0 to i64
|
||||
%arrayidx = getelementptr inbounds [0 x i32]* getelementptr inbounds ([1 x [0 x i32]]* @g_244, i32 0, i64 0), i32 0, i64 %idxprom
|
||||
%1 = load i32* %arrayidx, align 1, !tbaa !0
|
||||
store i32 %1, i32* @func_21_l_773, align 4, !tbaa !0
|
||||
store i32 1, i32* @g_814, align 4, !tbaa !0
|
||||
%1 = load i32* %arrayidx, align 1
|
||||
store i32 %1, i32* @func_21_l_773, align 4
|
||||
store i32 1, i32* @g_814, align 4
|
||||
br label %for.cond
|
||||
|
||||
for.end: ; preds = %for.cond
|
||||
%2 = load i32* @func_21_l_773, align 4, !tbaa !0
|
||||
%2 = load i32* @func_21_l_773, align 4
|
||||
%tobool = icmp ne i32 %2, 0
|
||||
br i1 %tobool, label %lbl_818, label %if.end
|
||||
|
||||
@ -41,7 +41,3 @@ if.end: ; preds = %for.end
|
||||
}
|
||||
|
||||
declare void @func_27(...)
|
||||
|
||||
!0 = metadata !{metadata !"int", metadata !1}
|
||||
!1 = metadata !{metadata !"omnipotent char", metadata !2}
|
||||
!2 = metadata !{metadata !"Simple C/C++ TBAA", null}
|
||||
|
Loading…
Reference in New Issue
Block a user