[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Lower / ppc-intrinsics.f90
blob293a35a63b061d00f78202c7913285223ba5c02a
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)
7 real :: a, x, y, z
8 z = fmadd(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]}})
11 end
13 ! CHECK-LABEL: fmadd_testd
14 subroutine fmadd_testd(a, x, y)
15 real(8) :: a, x, y, z
16 z = fmadd(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]}})
19 end
21 ! CHECK-LABEL: fnmadd_testr
22 subroutine fnmadd_testr(a, x, y)
23 real :: a, x, y, z
24 z = fnmadd(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]}})
27 end
29 ! CHECK-LABEL: fnmadd_testd
30 subroutine fnmadd_testd(a, x, y)
31 real(8) :: a, x, y, z
32 z = fnmadd(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]}})
35 end
37 ! CHECK-LABEL: fmsub_testr
38 subroutine fmsub_testr(a, x, y)
39 real :: a, x, y, z
40 z = fmsub(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]}})
43 end
45 ! CHECK-LABEL: fmsub_testd
46 subroutine fmsub_testd(a, x, y)
47 real(8) :: a, x, y, z
48 z = fmsub(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]}})
51 end
53 ! CHECK-LABEL: fnmsub_testr
54 subroutine fnmsub_testr(a, x, y)
55 real :: a, x, y, z
56 z = fnmsub(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]}})
59 end
61 ! CHECK-LABEL: fnmsub_testd
62 subroutine fnmsub_testd(a, x, y)
63 real(8) :: a, x, y, z
64 z = fnmsub(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]}})
67 end