28 lines · plain
1; Check that when removing arguments, incorrect callsite calling conventions are preserved2 3; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=arguments --test FileCheck --test-arg --check-prefixes=INTERESTING --test-arg %s --test-arg --input-file %s -o %t4; RUN: FileCheck --check-prefixes=RESULT %s < %t5 6; INTERESTING-LABEL: @fastcc_callee(7define fastcc i32 @fastcc_callee(i32 %a, i32 %b) {8 ret i32 %a9}10 11; INTERESTING-LABEL: @fastcc_callee_decl(12declare fastcc i32 @fastcc_callee_decl(i32 %a, i32 %b)13 14; INTERESTING-LABEL: @caller_wrong_callsites(15; INTERESTING: call16; INTERESTING: call17 18; RESULT-LABEL: define i32 @caller_wrong_callsites()19; RESULT: %call0 = call coldcc i32 @fastcc_callee()20; RESULT: %call1 = call i32 @fastcc_callee_decl()21define i32 @caller_wrong_callsites(i32 %x) {22 %call0 = call coldcc i32 @fastcc_callee(i32 %x, i32 2)23 %call1 = call ccc i32 @fastcc_callee_decl(i32 %x, i32 2)24 %result = add i32 %call0, %call125 ret i32 %result26}27 28