1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes
2 ; RUN: opt < %s -passes=argpromotion -S | FileCheck %s
7 define internal i32 @test(ptr %x) {
8 ; CHECK-LABEL: define {{[^@]+}}@test
9 ; CHECK-SAME: (i32 [[X_0_VAL_0_VAL:%.*]]) {
11 ; CHECK-NEXT: ret i32 [[X_0_VAL_0_VAL]]
19 define i32 @caller() {
20 ; CHECK-LABEL: define {{[^@]+}}@caller() {
22 ; CHECK-NEXT: [[G2_VAL:%.*]] = load ptr, ptr @G2, align 8
23 ; CHECK-NEXT: [[G2_VAL_VAL:%.*]] = load i32, ptr [[G2_VAL]], align 4
24 ; CHECK-NEXT: [[X:%.*]] = call i32 @test(i32 [[G2_VAL_VAL]])
25 ; CHECK-NEXT: ret i32 [[X]]
28 %x = call i32 @test(ptr @G2)