1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 < %s | FileCheck -check-prefix=GCN %s
4 define double @v_constained_fma_f64_fpexcept_strict(double %x, double %y, double %z) #0 {
5 ; GCN-LABEL: v_constained_fma_f64_fpexcept_strict:
7 ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
8 ; GCN-NEXT: v_fma_f64 v[0:1], v[0:1], v[2:3], v[4:5]
9 ; GCN-NEXT: s_setpc_b64 s[30:31]
10 %val = call double @llvm.experimental.constrained.fma.f64(double %x, double %y, double %z, metadata !"round.tonearest", metadata !"fpexcept.strict")
14 define <2 x double> @v_constained_fma_v2f64_fpexcept_strict(<2 x double> %x, <2 x double> %y, <2 x double> %z) #0 {
15 ; GCN-LABEL: v_constained_fma_v2f64_fpexcept_strict:
17 ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
18 ; GCN-NEXT: v_fma_f64 v[0:1], v[0:1], v[4:5], v[8:9]
19 ; GCN-NEXT: v_fma_f64 v[2:3], v[2:3], v[6:7], v[10:11]
20 ; GCN-NEXT: s_setpc_b64 s[30:31]
21 %val = call <2 x double> @llvm.experimental.constrained.fma.v2f64(<2 x double> %x, <2 x double> %y, <2 x double> %z, metadata !"round.tonearest", metadata !"fpexcept.strict")
25 define <3 x double> @v_constained_fma_v3f64_fpexcept_strict(<3 x double> %x, <3 x double> %y, <3 x double> %z) #0 {
26 ; GCN-LABEL: v_constained_fma_v3f64_fpexcept_strict:
28 ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
29 ; GCN-NEXT: v_fma_f64 v[0:1], v[0:1], v[6:7], v[12:13]
30 ; GCN-NEXT: v_fma_f64 v[2:3], v[2:3], v[8:9], v[14:15]
31 ; GCN-NEXT: v_fma_f64 v[4:5], v[4:5], v[10:11], v[16:17]
32 ; GCN-NEXT: s_setpc_b64 s[30:31]
33 %val = call <3 x double> @llvm.experimental.constrained.fma.v3f64(<3 x double> %x, <3 x double> %y, <3 x double> %z, metadata !"round.tonearest", metadata !"fpexcept.strict")
37 define <4 x double> @v_constained_fma_v4f64_fpexcept_strict(<4 x double> %x, <4 x double> %y, <4 x double> %z) #0 {
38 ; GCN-LABEL: v_constained_fma_v4f64_fpexcept_strict:
40 ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
41 ; GCN-NEXT: v_fma_f64 v[0:1], v[0:1], v[8:9], v[16:17]
42 ; GCN-NEXT: v_fma_f64 v[2:3], v[2:3], v[10:11], v[18:19]
43 ; GCN-NEXT: v_fma_f64 v[4:5], v[4:5], v[12:13], v[20:21]
44 ; GCN-NEXT: v_fma_f64 v[6:7], v[6:7], v[14:15], v[22:23]
45 ; GCN-NEXT: s_setpc_b64 s[30:31]
46 %val = call <4 x double> @llvm.experimental.constrained.fma.v4f64(<4 x double> %x, <4 x double> %y, <4 x double> %z, metadata !"round.tonearest", metadata !"fpexcept.strict")
50 define double @v_constained_fma_f64_fpexcept_strict_fneg(double %x, double %y, double %z) #0 {
51 ; GCN-LABEL: v_constained_fma_f64_fpexcept_strict_fneg:
53 ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
54 ; GCN-NEXT: v_fma_f64 v[0:1], v[0:1], v[2:3], -v[4:5]
55 ; GCN-NEXT: s_setpc_b64 s[30:31]
56 %neg.z = fneg double %z
57 %val = call double @llvm.experimental.constrained.fma.f64(double %x, double %y, double %neg.z, metadata !"round.tonearest", metadata !"fpexcept.strict")
61 define double @v_constained_fma_f64_fpexcept_strict_fneg_fneg(double %x, double %y, double %z) #0 {
62 ; GCN-LABEL: v_constained_fma_f64_fpexcept_strict_fneg_fneg:
64 ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
65 ; GCN-NEXT: v_fma_f64 v[0:1], -v[0:1], -v[2:3], v[4:5]
66 ; GCN-NEXT: s_setpc_b64 s[30:31]
67 %neg.x = fneg double %x
68 %neg.y = fneg double %y
69 %val = call double @llvm.experimental.constrained.fma.f64(double %neg.x, double %neg.y, double %z, metadata !"round.tonearest", metadata !"fpexcept.strict")
73 define double @v_constained_fma_f64_fpexcept_strict_fabs_fabs(double %x, double %y, double %z) #0 {
74 ; GCN-LABEL: v_constained_fma_f64_fpexcept_strict_fabs_fabs:
76 ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
77 ; GCN-NEXT: v_fma_f64 v[0:1], |v[0:1]|, |v[2:3]|, v[4:5]
78 ; GCN-NEXT: s_setpc_b64 s[30:31]
79 %neg.x = call double @llvm.fabs.f64(double %x) #0
80 %neg.y = call double @llvm.fabs.f64(double %y) #0
81 %val = call double @llvm.experimental.constrained.fma.f64(double %neg.x, double %neg.y, double %z, metadata !"round.tonearest", metadata !"fpexcept.strict")
85 define <2 x double> @v_constained_fma_v2f64_fpexcept_strict_fneg_fneg(<2 x double> %x, <2 x double> %y, <2 x double> %z) #0 {
86 ; GCN-LABEL: v_constained_fma_v2f64_fpexcept_strict_fneg_fneg:
88 ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
89 ; GCN-NEXT: v_fma_f64 v[0:1], -v[0:1], -v[4:5], v[8:9]
90 ; GCN-NEXT: v_fma_f64 v[2:3], -v[2:3], -v[6:7], v[10:11]
91 ; GCN-NEXT: s_setpc_b64 s[30:31]
92 %neg.x = fneg <2 x double> %x
93 %neg.y = fneg <2 x double> %y
94 %val = call <2 x double> @llvm.experimental.constrained.fma.v2f64(<2 x double> %neg.x, <2 x double> %neg.y, <2 x double> %z, metadata !"round.tonearest", metadata !"fpexcept.strict")
98 declare double @llvm.fabs.f64(double)
99 declare double @llvm.experimental.constrained.fma.f64(double, double, double, metadata, metadata)
100 declare <2 x double> @llvm.experimental.constrained.fma.v2f64(<2 x double>, <2 x double>, <2 x double>, metadata, metadata)
101 declare <3 x double> @llvm.experimental.constrained.fma.v3f64(<3 x double>, <3 x double>, <3 x double>, metadata, metadata)
102 declare <4 x double> @llvm.experimental.constrained.fma.v4f64(<4 x double>, <4 x double>, <4 x double>, metadata, metadata)
104 attributes #0 = { strictfp }