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
This commit is contained in:
Manman Ren 2013-09-30 18:17:55 +00:00
parent aef1b37824
commit e267f04ef5
9 changed files with 74 additions and 63 deletions

View File

@ -25,9 +25,9 @@ entry:
%agg.tmp = alloca %"class.std::__exception_ptr::exception_ptr", align 8
%__mut_ = getelementptr inbounds %"class.std::__1::__assoc_sub_state"* %this, i64 0, i32 2
%__m_.i.i = getelementptr inbounds %"class.std::__1::unique_lock"* %__lk, i64 0, i32 0
store %"class.std::__1::mutex"* %__mut_, %"class.std::__1::mutex"** %__m_.i.i, align 8, !tbaa !0
store %"class.std::__1::mutex"* %__mut_, %"class.std::__1::mutex"** %__m_.i.i, align 8, !tbaa !5
%__owns_.i.i = getelementptr inbounds %"class.std::__1::unique_lock"* %__lk, i64 0, i32 1
store i8 1, i8* %__owns_.i.i, align 8, !tbaa !3
store i8 1, i8* %__owns_.i.i, align 8, !tbaa !6
call void @_ZNSt3__15mutex4lockEv(%"class.std::__1::mutex"* %__mut_) #4
invoke void @_ZNSt3__117__assoc_sub_state10__sub_waitERNS_11unique_lockINS_5mutexEEE(%"class.std::__1::__assoc_sub_state"* %this, %"class.std::__1::unique_lock"* %__lk) #4
to label %invoke.cont unwind label %lpad
@ -65,12 +65,12 @@ lpad3: ; preds = %if.then
br label %ehcleanup
if.end: ; preds = %invoke.cont
%7 = load i8* %__owns_.i.i, align 8, !tbaa !3, !range !4
%7 = load i8* %__owns_.i.i, align 8, !tbaa !6, !range !4
%tobool.i.i = icmp eq i8 %7, 0
br i1 %tobool.i.i, label %_ZNSt3__111unique_lockINS_5mutexEED1Ev.exit, label %if.then.i.i
if.then.i.i: ; preds = %if.end
%8 = load %"class.std::__1::mutex"** %__m_.i.i, align 8, !tbaa !0
%8 = load %"class.std::__1::mutex"** %__m_.i.i, align 8, !tbaa !5
call void @_ZNSt3__15mutex6unlockEv(%"class.std::__1::mutex"* %8) #5
br label %_ZNSt3__111unique_lockINS_5mutexEED1Ev.exit
@ -80,12 +80,12 @@ _ZNSt3__111unique_lockINS_5mutexEED1Ev.exit: ; preds = %if.then.i.i, %if.en
ehcleanup: ; preds = %lpad3, %lpad
%exn.slot.0 = phi i8* [ %5, %lpad3 ], [ %2, %lpad ]
%ehselector.slot.0 = phi i32 [ %6, %lpad3 ], [ %3, %lpad ]
%9 = load i8* %__owns_.i.i, align 8, !tbaa !3, !range !4
%9 = load i8* %__owns_.i.i, align 8, !tbaa !6, !range !4
%tobool.i.i9 = icmp eq i8 %9, 0
br i1 %tobool.i.i9, label %_ZNSt3__111unique_lockINS_5mutexEED1Ev.exit12, label %if.then.i.i11
if.then.i.i11: ; preds = %ehcleanup
%10 = load %"class.std::__1::mutex"** %__m_.i.i, align 8, !tbaa !0
%10 = load %"class.std::__1::mutex"** %__m_.i.i, align 8, !tbaa !5
call void @_ZNSt3__15mutex6unlockEv(%"class.std::__1::mutex"* %10) #5
br label %_ZNSt3__111unique_lockINS_5mutexEED1Ev.exit12
@ -135,3 +135,5 @@ attributes #6 = { noreturn optsize }
!2 = metadata !{metadata !"Simple C/C++ TBAA"}
!3 = metadata !{metadata !"bool", metadata !1}
!4 = metadata !{i8 0, i8 2}
!5 = metadata !{metadata !0, metadata !0, i64 0}
!6 = metadata !{metadata !3, metadata !3, i64 0}

View File

@ -88,15 +88,15 @@ define void @test(i32 %a1, i32 %a2, i32 %a3, i32 %a4) {
define void @vgpr_coords(float addrspace(2)* addrspace(2)* inreg, <16 x i8> addrspace(2)* inreg, <32 x i8> addrspace(2)* inreg, i32 inreg, <2 x i32>, <2 x i32>, <2 x i32>, <3 x i32>, <2 x i32>, <2 x i32>, <2 x i32>, float, float, float, float, float, float, float, float, float) #0 {
main_body:
%20 = getelementptr float addrspace(2)* addrspace(2)* %0, i32 0
%21 = load float addrspace(2)* addrspace(2)* %20, !tbaa !0
%21 = load float addrspace(2)* addrspace(2)* %20, !tbaa !2
%22 = getelementptr float addrspace(2)* %21, i32 0
%23 = load float addrspace(2)* %22, !tbaa !0, !invariant.load !1
%23 = load float addrspace(2)* %22, !tbaa !2, !invariant.load !1
%24 = getelementptr float addrspace(2)* %21, i32 1
%25 = load float addrspace(2)* %24, !tbaa !0, !invariant.load !1
%25 = load float addrspace(2)* %24, !tbaa !2, !invariant.load !1
%26 = getelementptr float addrspace(2)* %21, i32 4
%27 = load float addrspace(2)* %26, !tbaa !0, !invariant.load !1
%27 = load float addrspace(2)* %26, !tbaa !2, !invariant.load !1
%28 = getelementptr <32 x i8> addrspace(2)* %2, i32 0
%29 = load <32 x i8> addrspace(2)* %28, !tbaa !0
%29 = load <32 x i8> addrspace(2)* %28, !tbaa !2
%30 = bitcast float %27 to i32
%31 = bitcast float %23 to i32
%32 = bitcast float %25 to i32
@ -126,6 +126,6 @@ declare void @llvm.SI.export(i32, i32, i32, i32, i32, float, float, float, float
attributes #0 = { "ShaderType"="0" }
attributes #1 = { nounwind readnone }
!0 = metadata !{metadata !"const", null, i32 1}
!0 = metadata !{metadata !"const", null}
!1 = metadata !{}
!2 = metadata !{metadata !0, metadata !0, i64 0, i32 1}

View File

@ -9,7 +9,7 @@
define void @phi1(<16 x i8> addrspace(2)* inreg, <16 x i8> addrspace(2)* inreg, <32 x i8> addrspace(2)* inreg, i32 inreg, <2 x i32>, <2 x i32>, <2 x i32>, <3 x i32>, <2 x i32>, <2 x i32>, <2 x i32>, float, float, float, float, float, float, float, float, float) #0 {
main_body:
%20 = getelementptr <16 x i8> addrspace(2)* %0, i32 0
%21 = load <16 x i8> addrspace(2)* %20, !tbaa !0
%21 = load <16 x i8> addrspace(2)* %20, !tbaa !1
%22 = call float @llvm.SI.load.const(<16 x i8> %21, i32 0)
%23 = call float @llvm.SI.load.const(<16 x i8> %21, i32 16)
%24 = call float @llvm.SI.load.const(<16 x i8> %21, i32 32)
@ -33,7 +33,7 @@ ENDIF: ; preds = %main_body, %ELSE
define void @phi2(<16 x i8> addrspace(2)* inreg, <16 x i8> addrspace(2)* inreg, <32 x i8> addrspace(2)* inreg, i32 inreg, <2 x i32>, <2 x i32>, <2 x i32>, <3 x i32>, <2 x i32>, <2 x i32>, <2 x i32>, float, float, float, float, float, float, float, float, float) #0 {
main_body:
%20 = getelementptr <16 x i8> addrspace(2)* %0, i32 0
%21 = load <16 x i8> addrspace(2)* %20, !tbaa !0
%21 = load <16 x i8> addrspace(2)* %20, !tbaa !1
%22 = call float @llvm.SI.load.const(<16 x i8> %21, i32 16)
%23 = call float @llvm.SI.load.const(<16 x i8> %21, i32 32)
%24 = call float @llvm.SI.load.const(<16 x i8> %21, i32 36)
@ -50,9 +50,9 @@ main_body:
%35 = call float @llvm.SI.load.const(<16 x i8> %21, i32 88)
%36 = call float @llvm.SI.load.const(<16 x i8> %21, i32 92)
%37 = getelementptr <32 x i8> addrspace(2)* %2, i32 0
%38 = load <32 x i8> addrspace(2)* %37, !tbaa !0
%38 = load <32 x i8> addrspace(2)* %37, !tbaa !1
%39 = getelementptr <16 x i8> addrspace(2)* %1, i32 0
%40 = load <16 x i8> addrspace(2)* %39, !tbaa !0
%40 = load <16 x i8> addrspace(2)* %39, !tbaa !1
%41 = call float @llvm.SI.fs.interp(i32 0, i32 0, i32 %3, <2 x i32> %5)
%42 = call float @llvm.SI.fs.interp(i32 1, i32 0, i32 %3, <2 x i32> %5)
%43 = call float @llvm.SI.fs.interp(i32 0, i32 1, i32 %3, <2 x i32> %5)
@ -154,7 +154,7 @@ ENDIF24: ; preds = %ENDIF, %IF25
define void @loop(<16 x i8> addrspace(2)* inreg, <16 x i8> addrspace(2)* inreg, <32 x i8> addrspace(2)* inreg, i32 inreg, <2 x i32>, <2 x i32>, <2 x i32>, <3 x i32>, <2 x i32>, <2 x i32>, <2 x i32>, float, float, float, float, float, float, float, float, float) #0 {
main_body:
%20 = getelementptr <16 x i8> addrspace(2)* %0, i32 0
%21 = load <16 x i8> addrspace(2)* %20, !tbaa !0
%21 = load <16 x i8> addrspace(2)* %20, !tbaa !1
%22 = call float @llvm.SI.load.const(<16 x i8> %21, i32 0)
%23 = call float @llvm.SI.load.const(<16 x i8> %21, i32 4)
%24 = call float @llvm.SI.load.const(<16 x i8> %21, i32 8)
@ -202,7 +202,8 @@ attributes #2 = { readonly }
attributes #3 = { readnone }
attributes #4 = { nounwind readonly }
!0 = metadata !{metadata !"const", null, i32 1}
!0 = metadata !{metadata !"const", null}
!1 = metadata !{metadata !0, metadata !0, i64 0, i32 1}
; Function Attrs: nounwind readnone
declare float @llvm.SI.fs.interp(i32, i32, i32, <2 x i32>) #1

View File

@ -9,12 +9,12 @@
define void @main(<16 x i8> addrspace(2)* inreg, <16 x i8> addrspace(2)* inreg, <32 x i8> addrspace(2)* inreg, i32 inreg, <2 x i32>, <2 x i32>, <2 x i32>, <3 x i32>, <2 x i32>, <2 x i32>, <2 x i32>, float, float, float, float, float, float, float, float, float) #0 {
main_body:
%20 = getelementptr <16 x i8> addrspace(2)* %0, i32 0
%21 = load <16 x i8> addrspace(2)* %20, !tbaa !0
%21 = load <16 x i8> addrspace(2)* %20, !tbaa !1
%22 = call float @llvm.SI.load.const(<16 x i8> %21, i32 16)
%23 = getelementptr <32 x i8> addrspace(2)* %2, i32 0
%24 = load <32 x i8> addrspace(2)* %23, !tbaa !0
%24 = load <32 x i8> addrspace(2)* %23, !tbaa !1
%25 = getelementptr <16 x i8> addrspace(2)* %1, i32 0
%26 = load <16 x i8> addrspace(2)* %25, !tbaa !0
%26 = load <16 x i8> addrspace(2)* %25, !tbaa !1
%27 = call float @llvm.SI.fs.interp(i32 0, i32 0, i32 %3, <2 x i32> %5)
%28 = call float @llvm.SI.fs.interp(i32 1, i32 0, i32 %3, <2 x i32> %5)
%29 = bitcast float %22 to i32
@ -47,4 +47,5 @@ declare void @llvm.SI.export(i32, i32, i32, i32, i32, float, float, float, float
attributes #0 = { "ShaderType"="0" }
attributes #1 = { nounwind readnone }
!0 = metadata !{metadata !"const", null, i32 1}
!0 = metadata !{metadata !"const", null}
!1 = metadata !{metadata !0, metadata !0, i64 0, i32 1}

View File

@ -27,15 +27,15 @@
define i32 @foo(%struct.jmpbuf_env* byval %inbuf) #0 {
entry:
%0 = getelementptr inbounds %struct.jmpbuf_env* %inbuf, i32 0, i32 0
store i32 0, i32* %0, align 4, !tbaa !2
store i32 0, i32* %0, align 4, !tbaa !4
%1 = getelementptr inbounds %struct.jmpbuf_env* %inbuf, i32 0, i32 1
store i32 1, i32* %1, align 4, !tbaa !2
store i32 1, i32* %1, align 4, !tbaa !4
%2 = getelementptr inbounds %struct.jmpbuf_env* %inbuf, i32 0, i32 2, i32 0
%3 = call i32 @_setjmp(%struct.__jmp_buf_tag* %2) #2
%4 = getelementptr inbounds %struct.jmpbuf_env* %inbuf, i32 0, i32 3
store i32 %3, i32* %4, align 4, !tbaa !2
store %struct.jmpbuf_env* %inbuf, %struct.jmpbuf_env** @jenv, align 4, !tbaa !0
%5 = load i32* %1, align 4, !tbaa !2
store i32 %3, i32* %4, align 4, !tbaa !4
store %struct.jmpbuf_env* %inbuf, %struct.jmpbuf_env** @jenv, align 4, !tbaa !3
%5 = load i32* %1, align 4, !tbaa !4
%6 = icmp eq i32 %5, 1
%7 = icmp eq i32 %3, 0
%or.cond = and i1 %6, %7
@ -46,7 +46,7 @@ entry:
unreachable
bar.exit: ; preds = %entry
%8 = load i32* %0, align 4, !tbaa !2
%8 = load i32* %0, align 4, !tbaa !4
%9 = call i32 (i8*, ...)* @printf(i8* noalias getelementptr inbounds ([30 x i8]* @.cst, i32 0, i32 0), i32 %8) #0
ret i32 0
}
@ -68,3 +68,5 @@ attributes #2 = { nounwind returns_twice }
!0 = metadata !{metadata !"alias set 6: struct.jmpbuf_env*", metadata !1}
!1 = metadata !{metadata !1}
!2 = metadata !{metadata !"alias set 3: int", metadata !1}
!3 = metadata !{metadata !0, metadata !0, i64 0}
!4 = metadata !{metadata !2, metadata !2, i64 0}

View File

@ -352,10 +352,10 @@ define void @f25(i64 *%ptr1, i64 *%ptr2) {
; CHECK-LABEL: f25:
; CHECK: nc 0(8,%r3), 0(%r2)
; CHECK: br %r14
%val = load i64 *%ptr1, align 2, !tbaa !1
%old = load i64 *%ptr2, align 2, !tbaa !2
%val = load i64 *%ptr1, align 2, !tbaa !3
%old = load i64 *%ptr2, align 2, !tbaa !4
%and = and i64 %old, %val
store i64 %and, i64 *%ptr2, align 2, !tbaa !2
store i64 %and, i64 *%ptr2, align 2, !tbaa !4
ret void
}
@ -364,13 +364,15 @@ define void @f26(i64 *%ptr1, i64 *%ptr2) {
; CHECK-LABEL: f26:
; CHECK-NOT: nc
; CHECK: br %r14
%val = load i64 *%ptr1, align 2, !tbaa !1
%old = load i64 *%ptr2, align 2, !tbaa !1
%val = load i64 *%ptr1, align 2, !tbaa !3
%old = load i64 *%ptr2, align 2, !tbaa !3
%and = and i64 %old, %val
store i64 %and, i64 *%ptr2, align 2, !tbaa !1
store i64 %and, i64 *%ptr2, align 2, !tbaa !3
ret void
}
!0 = metadata !{ metadata !"root" }
!1 = metadata !{ metadata !"set1", metadata !0 }
!2 = metadata !{ metadata !"set2", metadata !0 }
!3 = metadata !{ metadata !1, metadata !1, i64 0}
!4 = metadata !{ metadata !2, metadata !2, i64 0}

View File

@ -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}

View File

@ -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}

View File

@ -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}