1 ; Test vector negative multiply-and-add on z14.
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z14 | FileCheck %s
5 declare <2 x double> @llvm.experimental.constrained.fma.v2f64(<2 x double>, <2 x double>, <2 x double>, metadata, metadata)
6 declare <4 x float> @llvm.experimental.constrained.fma.v4f32(<4 x float>, <4 x float>, <4 x float>, metadata, metadata)
8 ; Test a v2f64 negative multiply-and-add.
9 define <2 x double> @f1(<2 x double> %dummy, <2 x double> %val1,
10 <2 x double> %val2, <2 x double> %val3) #0 {
12 ; CHECK: vfnmadb %v24, %v26, %v28, %v30
14 %ret = call <2 x double> @llvm.experimental.constrained.fma.v2f64 (
18 metadata !"round.dynamic",
19 metadata !"fpexcept.strict") #0
20 %negret = fsub <2 x double> <double -0.0, double -0.0>, %ret
21 ret <2 x double> %negret
24 ; Test a v2f64 negative multiply-and-subtract.
25 define <2 x double> @f2(<2 x double> %dummy, <2 x double> %val1,
26 <2 x double> %val2, <2 x double> %val3) #0 {
28 ; CHECK: vfnmsdb %v24, %v26, %v28, %v30
30 %negval3 = fsub <2 x double> <double -0.0, double -0.0>, %val3
31 %ret = call <2 x double> @llvm.experimental.constrained.fma.v2f64 (
34 <2 x double> %negval3,
35 metadata !"round.dynamic",
36 metadata !"fpexcept.strict") #0
37 %negret = fsub <2 x double> <double -0.0, double -0.0>, %ret
38 ret <2 x double> %negret
41 ; Test a v4f32 negative multiply-and-add.
42 define <4 x float> @f3(<4 x float> %dummy, <4 x float> %val1,
43 <4 x float> %val2, <4 x float> %val3) #0 {
45 ; CHECK: vfnmasb %v24, %v26, %v28, %v30
47 %ret = call <4 x float> @llvm.experimental.constrained.fma.v4f32 (
51 metadata !"round.dynamic",
52 metadata !"fpexcept.strict") #0
53 %negret = fsub <4 x float> <float -0.0, float -0.0,
54 float -0.0, float -0.0>, %ret
55 ret <4 x float> %negret
58 ; Test a v4f32 negative multiply-and-subtract.
59 define <4 x float> @f4(<4 x float> %dummy, <4 x float> %val1,
60 <4 x float> %val2, <4 x float> %val3) #0 {
62 ; CHECK: vfnmssb %v24, %v26, %v28, %v30
64 %negval3 = fsub <4 x float> <float -0.0, float -0.0,
65 float -0.0, float -0.0>, %val3
66 %ret = call <4 x float> @llvm.experimental.constrained.fma.v4f32 (
70 metadata !"round.dynamic",
71 metadata !"fpexcept.strict") #0
72 %negret = fsub <4 x float> <float -0.0, float -0.0,
73 float -0.0, float -0.0>, %ret
74 ret <4 x float> %negret
77 attributes #0 = { strictfp }