1 ! RUN: bbc -emit-fir %s -outline-intrinsics -o - | FileCheck --check-prefixes="CHECK-FIR" %s
2 ! RUN: %flang_fc1 -emit-llvm %s -o - | FileCheck --check-prefixes="CHECK-LLVMIR" %s
3 ! REQUIRES: target=powerpc{{.*}}
5 ! CHECK-LABEL: fmadd_testr
6 subroutine fmadd_testr(a
, x
, y
)
9 ! CHECK-FIR: fir.call @fir.__ppc_fmadd.f32.f32.f32.f32
10 ! CHECK-LLVMIR: call contract float @llvm.fma.f32(float %{{[0-9]}}, float %{{[0-9]}}, float %{{[0-9]}})
13 ! CHECK-LABEL: fmadd_testd
14 subroutine fmadd_testd(a
, x
, y
)
17 ! CHECK-FIR: fir.call @fir.__ppc_fmadd.f64.f64.f64.f64
18 ! CHECK-LLVMIR: call contract double @llvm.fma.f64(double %{{[0-9]}}, double %{{[0-9]}}, double %{{[0-9]}})
21 ! CHECK-LABEL: fnmadd_testr
22 subroutine fnmadd_testr(a
, x
, y
)
25 ! CHECK-FIR: fir.call @fir.__ppc_fnmadd.f32.f32.f32.f32
26 ! CHECK-LLVMIR: call contract float @llvm.ppc.fnmadds(float %{{[0-9]}}, float %{{[0-9]}}, float %{{[0-9]}})
29 ! CHECK-LABEL: fnmadd_testd
30 subroutine fnmadd_testd(a
, x
, y
)
33 ! CHECK-FIR: fir.call @fir.__ppc_fnmadd.f64.f64.f64.f64
34 ! CHECK-LLVMIR: call contract double @llvm.ppc.fnmadd(double %{{[0-9]}}, double %{{[0-9]}}, double %{{[0-9]}})
37 ! CHECK-LABEL: fmsub_testr
38 subroutine fmsub_testr(a
, x
, y
)
41 ! CHECK-FIR: fir.call @fir.__ppc_fmsub.f32.f32.f32.f32
42 ! CHECK-LLVMIR: call contract float @llvm.ppc.fmsubs(float %{{[0-9]}}, float %{{[0-9]}}, float %{{[0-9]}})
45 ! CHECK-LABEL: fmsub_testd
46 subroutine fmsub_testd(a
, x
, y
)
49 ! CHECK-FIR: fir.call @fir.__ppc_fmsub.f64.f64.f64.f64
50 ! CHECK-LLVMIR: call contract double @llvm.ppc.fmsub(double %{{[0-9]}}, double %{{[0-9]}}, double %{{[0-9]}})
53 ! CHECK-LABEL: fnmsub_testr
54 subroutine fnmsub_testr(a
, x
, y
)
57 ! CHECK-FIR: fir.call @fir.__ppc_fnmsub.f32.f32.f32.f32
58 ! CHECK-LLVMIR: call contract float @llvm.ppc.fnmsub.f32(float %{{[0-9]}}, float %{{[0-9]}}, float %{{[0-9]}})
61 ! CHECK-LABEL: fnmsub_testd
62 subroutine fnmsub_testd(a
, x
, y
)
65 ! CHECK-FIR: fir.call @fir.__ppc_fnmsub.f64.f64.f64.f64
66 ! CHECK-LLVMIR: call contract double @llvm.ppc.fnmsub.f64(double %{{[0-9]}}, double %{{[0-9]}}, double %{{[0-9]}})
69 ! CHECK-LABEL: fctid_test
70 subroutine fctid_test(x
)
73 ! CHECK-FIR: fir.call @fir.__ppc_fctid.f64.f64
74 ! CHECK-LLVMIR: call contract double @llvm.ppc.fctid(double %{{[0-9]}})
77 ! CHECK-LABEL: fctidz_test
78 subroutine fctidz_test(x
)
81 ! CHECK-FIR: fir.call @fir.__ppc_fctidz.f64.f64
82 ! CHECK-LLVMIR: call contract double @llvm.ppc.fctidz(double %{{[0-9]}})
85 ! CHECK-LABEL: fctiw_test
86 subroutine fctiw_test(x
)
89 ! CHECK-FIR: fir.call @fir.__ppc_fctiw.f64.f64
90 ! CHECK-LLVMIR: call contract double @llvm.ppc.fctiw(double %{{[0-9]}})
93 ! CHECK-LABEL: fctiwz_test
94 subroutine fctiwz_test(x
)
97 ! CHECK-FIR: fir.call @fir.__ppc_fctiwz.f64.f64
98 ! CHECK-LLVMIR: call contract double @llvm.ppc.fctiwz(double %{{[0-9]}})
101 ! CHECK-LABEL: fctudz_test
102 subroutine fctudz_test(x
)
105 ! CHECK-FIR: fir.call @fir.__ppc_fctudz.f64.f64
106 ! CHECK-LLVMIR: call contract double @llvm.ppc.fctudz(double %{{[0-9]}})
109 ! CHECK-LABEL: fctuwz_test
110 subroutine fctuwz_test(x
)
113 ! CHECK-FIR: fir.call @fir.__ppc_fctuwz.f64.f64
114 ! CHECK-LLVMIR: call contract double @llvm.ppc.fctuwz(double %{{[0-9]}})
117 ! CHECK-LABEL: fcfi_test
118 subroutine fcfi_test(i
)
121 ! CHECK-FIR: fir.call @fir.__ppc_fcfi.f64.f64
122 ! CHECK-LLVMIR: call contract double @llvm.ppc.fcfid(double %{{[0-9]}})
125 ! CHECK-LABEL: fcfid_test
126 subroutine fcfid_test(i
)
129 ! CHECK-FIR: fir.call @fir.__ppc_fcfid.f64.f64
130 ! CHECK-LLVMIR: call contract double @llvm.ppc.fcfid(double %{{[0-9]}})
133 ! CHECK-LABEL: fcfud_test
134 subroutine fcfud_test(i
)
137 ! CHECK-FIR: fir.call @fir.__ppc_fcfud.f64.f64
138 ! CHECK-LLVMIR: call contract double @llvm.ppc.fcfud(double %{{[0-9]}})