brintos

brintos / llvm-project-archived public Read only

0
0
Text · 852 B · 2fb80a3 Raw
32 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes2; RUN: opt < %s -passes=argpromotion -S | FileCheck %s3 4@G1 = constant i32 05@G2 = constant ptr @G16 7define internal i32 @test(ptr %x) {8; CHECK-LABEL: define {{[^@]+}}@test9; CHECK-SAME: (i32 [[X_0_VAL_0_VAL:%.*]]) {10; CHECK-NEXT:  entry:11; CHECK-NEXT:    ret i32 [[X_0_VAL_0_VAL]]12;13entry:14  %y = load ptr, ptr %x15  %z = load i32, ptr %y16  ret i32 %z17}18 19define i32 @caller() {20; CHECK-LABEL: define {{[^@]+}}@caller() {21; CHECK-NEXT:  entry:22; CHECK-NEXT:    [[G2_VAL:%.*]] = load ptr, ptr @G2, align 823; CHECK-NEXT:    [[G2_VAL_VAL:%.*]] = load i32, ptr [[G2_VAL]], align 424; CHECK-NEXT:    [[X:%.*]] = call i32 @test(i32 [[G2_VAL_VAL]])25; CHECK-NEXT:    ret i32 [[X]]26;27entry:28  %x = call i32 @test(ptr @G2)29  ret i32 %x30}31 32