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) #0 {
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") #0
14 %negres = fneg double %res
18 define double @f2(double %f1, double %f2, double %acc) #0 {
20 ; CHECK: wfnmsdb %f0, %f0, %f2, %f4
22 %negacc = fneg double %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") #0
27 %negres = fneg double %res
31 define float @f3(float %f1, float %f2, float %acc) #0 {
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") #0
39 %negres = fneg float %res
43 define float @f4(float %f1, float %f2, float %acc) #0 {
45 ; CHECK: wfnmssb %f0, %f0, %f2, %f4
47 %negacc = fneg float %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") #0
52 %negres = fneg float %res
56 attributes #0 = { strictfp }