23 lines · plain
1! RUN: bbc -emit-fir %s -o - | FileCheck --check-prefix=CHECK-FIR %s2! RUN: %flang_fc1 -emit-llvm %s -o - | FileCheck --check-prefix=CHECK-LLVMIR %s3 4function test_real4(a, x, y)5 use ieee_arithmetic, only: ieee_fma6 real :: a, x, y7 test_real4 = ieee_fma(a, x, y)8end function9 10! CHECK-LABEL: @_QPtest_real411! CHECK-FIR: {{%[A-Za-z0-9._]+}} = math.fma {{%[0-9]+}}, {{%[0-9]+}}, {{%[0-9]+}} {{.*}} : f3212! CHECK-LLVMIR: {{%[A-Za-z0-9._]+}} = call {{.*}} float @llvm.fma.f32(float {{%[0-9]+}}, float {{%[0-9]+}}, float {{%[0-9]+}})13 14function test_real8(a, x, y)15 use ieee_arithmetic, only: ieee_fma16 real(8) :: a, x, y17 test_real8 = ieee_fma(a, x, y)18end function19 20! CHECK-LABEL: @_QPtest_real821! CHECK-FIR: {{%[A-Za-z0-9._]+}} = math.fma {{%[0-9]+}}, {{%[0-9]+}}, {{%[0-9]+}} {{.*}} : f6422! CHECK-LLVMIR: {{%[A-Za-z0-9._]+}} = call {{.*}} double @llvm.fma.f64(double {{%[0-9]+}}, double {{%[0-9]+}}, double {{%[0-9]+}})23