1 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z14 | FileCheck %s
3 declare double @llvm.experimental.constrained.fma.f64(double %f1, double %f2, double %f3, metadata, metadata)
4 declare float @llvm.experimental.constrained.fma.f32(float %f1, float %f2, float %f3, metadata, metadata)
6 define double @f1(double %f1, double %f2, double %acc) {
8 ; CHECK: wfnmadb %f0, %f0, %f2, %f4
10 %res = call double @llvm.experimental.constrained.fma.f64 (
11 double %f1, double %f2, double %acc,
12 metadata !"round.dynamic",
13 metadata !"fpexcept.strict")
14 %negres = fsub double -0.0, %res
18 define double @f2(double %f1, double %f2, double %acc) {
20 ; CHECK: wfnmsdb %f0, %f0, %f2, %f4
22 %negacc = fsub double -0.0, %acc
23 %res = call double @llvm.experimental.constrained.fma.f64 (
24 double %f1, double %f2, double %negacc,
25 metadata !"round.dynamic",
26 metadata !"fpexcept.strict")
27 %negres = fsub double -0.0, %res
31 define float @f3(float %f1, float %f2, float %acc) {
33 ; CHECK: wfnmasb %f0, %f0, %f2, %f4
35 %res = call float @llvm.experimental.constrained.fma.f32 (
36 float %f1, float %f2, float %acc,
37 metadata !"round.dynamic",
38 metadata !"fpexcept.strict")
39 %negres = fsub float -0.0, %res
43 define float @f4(float %f1, float %f2, float %acc) {
45 ; CHECK: wfnmssb %f0, %f0, %f2, %f4
47 %negacc = fsub float -0.0, %acc
48 %res = call float @llvm.experimental.constrained.fma.f32 (
49 float %f1, float %f2, float %negacc,
50 metadata !"round.dynamic",
51 metadata !"fpexcept.strict")
52 %negres = fsub float -0.0, %res