1 ; RUN: opt < %s -argpromotion -S | FileCheck %s
3 target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
4 target triple = "x86_64-pc-windows-msvc"
6 ; CHECK: define internal void @add(i32 %[[THIS1:.*]], i32 %[[THIS2:.*]], i32* noalias %[[SR:.*]])
7 define internal void @add({i32, i32}* %this, i32* sret %r) {
8 %ap = getelementptr {i32, i32}, {i32, i32}* %this, i32 0, i32 0
9 %bp = getelementptr {i32, i32}, {i32, i32}* %this, i32 0, i32 1
10 %a = load i32, i32* %ap
11 %b = load i32, i32* %bp
12 ; CHECK: %[[AB:.*]] = add i32 %[[THIS1]], %[[THIS2]]
14 ; CHECK: store i32 %[[AB]], i32* %[[SR]]
15 store i32 %ab, i32* %r
19 ; CHECK: define void @f()
21 ; CHECK: %[[R:.*]] = alloca i32
23 %pair = alloca {i32, i32}
25 ; CHECK: call void @add(i32 %{{.*}}, i32 %{{.*}}, i32* noalias %[[R]])
26 call void @add({i32, i32}* %pair, i32* sret %r)