30 lines · plain
1; Check that when removing arguments, existing fast math flags 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: @math_callee(7define float @math_callee(float %a, float %b) {8 %add = fadd float %a, %b9 ret float %add10}11 12; INTERESTING-LABEL: @math_callee_decl(13declare float @math_callee_decl(float %a, float %b)14 15; INTERESTING-LABEL: @math_caller(16; INTERESTING: call17; INTERESTING: call18 19; RESULT: %call0 = call nnan nsz float @math_callee(), !fpmath !020; RESULT: %call1 = call ninf float @math_callee_decl()21define float @math_caller(float %x) {22 %call0 = call nnan nsz float @math_callee(float %x, float 2.0), !fpmath !023 %call1 = call ninf float @math_callee_decl(float %x, float 2.0)24 %result = fadd float %call0, %call125 ret float %result26}27 28; RESULT: !0 = !{float 2.000000e+00}29!0 = !{float 2.0}30