1 ; RUN: opt < %s -passes=argpromotion,mem2reg -S | FileCheck %s
3 target datalayout = "E-p:64:64:64"
7 define internal i32 @test(ptr %X, ptr %Y, ptr %Q) {
8 store i32 77, ptr %Q, !tbaa !2
9 %A = load i32, ptr %X, !tbaa !1
10 %B = load i32, ptr %Y, !tbaa !1
17 define internal i32 @caller(ptr %B, ptr %Q) {
19 store i32 78, ptr %Q, !tbaa !2
20 store i32 1, ptr %A, !tbaa !1
21 %C = call i32 @test(ptr %A, ptr %B, ptr %Q)
27 define i32 @callercaller(ptr %Q) {
29 store i32 2, ptr %B, !tbaa !1
30 store i32 79, ptr %Q, !tbaa !2
31 %X = call i32 @caller(ptr %B, ptr %Q)