1 ; RUN: opt < %s -tbaa -basicaa -argpromotion -mem2reg -S | not grep alloca
3 target datalayout = "E-p:64:64:64"
5 define internal i32 @test(i32* %X, i32* %Y, i32* %Q) {
6 store i32 77, i32* %Q, !tbaa !2
7 %A = load i32* %X, !tbaa !1
8 %B = load i32* %Y, !tbaa !1
13 define internal i32 @caller(i32* %B, i32* %Q) {
15 store i32 78, i32* %Q, !tbaa !2
16 store i32 1, i32* %A, !tbaa !1
17 %C = call i32 @test(i32* %A, i32* %B, i32* %Q)
21 define i32 @callercaller(i32* %Q) {
23 store i32 2, i32* %B, !tbaa !1
24 store i32 79, i32* %Q, !tbaa !2
25 %X = call i32 @caller(i32* %B, i32* %Q)
29 !0 = metadata !{metadata !"test"}
30 !1 = metadata !{metadata !"green", metadata !0}
31 !2 = metadata !{metadata !"blue", metadata !0}