blob: d81c8bd3fd60789928f56fadbd0e75de8bf66942 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
; RUN: opt < %s -argpromotion -S | FileCheck %s
; CHECK: define internal i32 @deref(i32 %x.val) nounwind {
define internal i32 @deref(i32* %x) nounwind {
entry:
%tmp2 = load i32* %x, align 4
ret i32 %tmp2
}
define i32 @f(i32 %x) {
entry:
%x_addr = alloca i32
store i32 %x, i32* %x_addr, align 4
; CHECK: %tmp1 = call i32 @deref(i32 %x_addr.val) nounwind
%tmp1 = call i32 @deref( i32* %x_addr ) nounwind
ret i32 %tmp1
}
|