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 = fneg <2 x double> %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 = fneg <2 x double> %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 = fneg <2 x double> %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 = fneg <4 x float> %ret
54 ret <4 x float> %negret
57 ; Test a v4f32 negative multiply-and-subtract.
58 define <4 x float> @f4(<4 x float> %dummy, <4 x float> %val1,
59 <4 x float> %val2, <4 x float> %val3) #0 {
61 ; CHECK: vfnmssb %v24, %v26, %v28, %v30
63 %negval3 = fneg <4 x float> %val3
64 %ret = call <4 x float> @llvm.experimental.constrained.fma.v4f32 (
68 metadata !"round.dynamic",
69 metadata !"fpexcept.strict") #0
70 %negret = fneg <4 x float> %ret
71 ret <4 x float> %negret
74 attributes #0 = { strictfp }