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 float @v_constained_fma_f32_fpexcept_strict(float %x, float %y, float %z) #0 {
5 ; GCN-LABEL: v_constained_fma_f32_fpexcept_strict:
7 ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
8 ; GCN-NEXT: v_fma_f32 v0, v0, v1, v2
9 ; GCN-NEXT: s_setpc_b64 s[30:31]
10 %val = call float @llvm.experimental.constrained.fma.f32(float %x, float %y, float %z, metadata !"round.tonearest", metadata !"fpexcept.strict")
14 define <2 x float> @v_constained_fma_v2f32_fpexcept_strict(<2 x float> %x, <2 x float> %y, <2 x float> %z) #0 {
15 ; GCN-LABEL: v_constained_fma_v2f32_fpexcept_strict:
17 ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
18 ; GCN-NEXT: v_fma_f32 v0, v0, v2, v4
19 ; GCN-NEXT: v_fma_f32 v1, v1, v3, v5
20 ; GCN-NEXT: s_setpc_b64 s[30:31]
21 %val = call <2 x float> @llvm.experimental.constrained.fma.v2f32(<2 x float> %x, <2 x float> %y, <2 x float> %z, metadata !"round.tonearest", metadata !"fpexcept.strict")
25 define <3 x float> @v_constained_fma_v3f32_fpexcept_strict(<3 x float> %x, <3 x float> %y, <3 x float> %z) #0 {
26 ; GCN-LABEL: v_constained_fma_v3f32_fpexcept_strict:
28 ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
29 ; GCN-NEXT: v_fma_f32 v0, v0, v3, v6
30 ; GCN-NEXT: v_fma_f32 v1, v1, v4, v7
31 ; GCN-NEXT: v_fma_f32 v2, v2, v5, v8
32 ; GCN-NEXT: s_setpc_b64 s[30:31]
33 %val = call <3 x float> @llvm.experimental.constrained.fma.v3f32(<3 x float> %x, <3 x float> %y, <3 x float> %z, metadata !"round.tonearest", metadata !"fpexcept.strict")
37 define <4 x float> @v_constained_fma_v4f32_fpexcept_strict(<4 x float> %x, <4 x float> %y, <4 x float> %z) #0 {
38 ; GCN-LABEL: v_constained_fma_v4f32_fpexcept_strict:
40 ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
41 ; GCN-NEXT: v_fma_f32 v0, v0, v4, v8
42 ; GCN-NEXT: v_fma_f32 v1, v1, v5, v9
43 ; GCN-NEXT: v_fma_f32 v2, v2, v6, v10
44 ; GCN-NEXT: v_fma_f32 v3, v3, v7, v11
45 ; GCN-NEXT: s_setpc_b64 s[30:31]
46 %val = call <4 x float> @llvm.experimental.constrained.fma.v4f32(<4 x float> %x, <4 x float> %y, <4 x float> %z, metadata !"round.tonearest", metadata !"fpexcept.strict")
50 define float @v_constained_fma_f32_fpexcept_strict_fneg(float %x, float %y, float %z) #0 {
51 ; GCN-LABEL: v_constained_fma_f32_fpexcept_strict_fneg:
53 ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
54 ; GCN-NEXT: v_fma_f32 v0, v0, v1, -v2
55 ; GCN-NEXT: s_setpc_b64 s[30:31]
56 %neg.z = fneg float %z
57 %val = call float @llvm.experimental.constrained.fma.f32(float %x, float %y, float %neg.z, metadata !"round.tonearest", metadata !"fpexcept.strict")
61 define float @v_constained_fma_f32_fpexcept_strict_fneg_fneg(float %x, float %y, float %z) #0 {
62 ; GCN-LABEL: v_constained_fma_f32_fpexcept_strict_fneg_fneg:
64 ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
65 ; GCN-NEXT: v_fma_f32 v0, -v0, -v1, v2
66 ; GCN-NEXT: s_setpc_b64 s[30:31]
67 %neg.x = fneg float %x
68 %neg.y = fneg float %y
69 %val = call float @llvm.experimental.constrained.fma.f32(float %neg.x, float %neg.y, float %z, metadata !"round.tonearest", metadata !"fpexcept.strict")
73 define float @v_constained_fma_f32_fpexcept_strict_fabs_fabs(float %x, float %y, float %z) #0 {
74 ; GCN-LABEL: v_constained_fma_f32_fpexcept_strict_fabs_fabs:
76 ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
77 ; GCN-NEXT: v_fma_f32 v0, |v0|, |v1|, v2
78 ; GCN-NEXT: s_setpc_b64 s[30:31]
79 %neg.x = call float @llvm.fabs.f32(float %x) #0
80 %neg.y = call float @llvm.fabs.f32(float %y) #0
81 %val = call float @llvm.experimental.constrained.fma.f32(float %neg.x, float %neg.y, float %z, metadata !"round.tonearest", metadata !"fpexcept.strict")
85 define <2 x float> @v_constained_fma_v2f32_fpexcept_strict_fneg_fneg(<2 x float> %x, <2 x float> %y, <2 x float> %z) #0 {
86 ; GCN-LABEL: v_constained_fma_v2f32_fpexcept_strict_fneg_fneg:
88 ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
89 ; GCN-NEXT: v_fma_f32 v0, -v0, -v2, v4
90 ; GCN-NEXT: v_fma_f32 v1, -v1, -v3, v5
91 ; GCN-NEXT: s_setpc_b64 s[30:31]
92 %neg.x = fneg <2 x float> %x
93 %neg.y = fneg <2 x float> %y
94 %val = call <2 x float> @llvm.experimental.constrained.fma.v2f32(<2 x float> %neg.x, <2 x float> %neg.y, <2 x float> %z, metadata !"round.tonearest", metadata !"fpexcept.strict")
98 declare float @llvm.fabs.f32(float)
99 declare float @llvm.experimental.constrained.fma.f32(float, float, float, metadata, metadata)
100 declare <2 x float> @llvm.experimental.constrained.fma.v2f32(<2 x float>, <2 x float>, <2 x float>, metadata, metadata)
101 declare <3 x float> @llvm.experimental.constrained.fma.v3f32(<3 x float>, <3 x float>, <3 x float>, metadata, metadata)
102 declare <4 x float> @llvm.experimental.constrained.fma.v4f32(<4 x float>, <4 x float>, <4 x float>, metadata, metadata)
104 attributes #0 = { strictfp }