|
1 | 1 | ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
|
2 | 2 | ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1100 -verify-machineinstrs < %s | FileCheck %s -check-prefix GFX11
|
3 |
| -define float @freeze_fadd(float %input) nounwind { |
4 |
| -; GFX11-LABEL: freeze_fadd: |
| 3 | + |
| 4 | +define float @freeze_fneg(float %input) nounwind { |
| 5 | +; GFX11-LABEL: freeze_fneg: |
5 | 6 | ; GFX11: ; %bb.0: ; %entry
|
6 | 7 | ; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
7 |
| -; GFX11-NEXT: v_add_f32_e32 v0, 2.0, v0 |
8 | 8 | ; GFX11-NEXT: s_setpc_b64 s[30:31]
|
9 | 9 | entry:
|
10 |
| - %x = fadd reassoc nsz arcp contract afn float %input, 1.000000e+00 |
| 10 | + %x = fneg reassoc nsz arcp contract afn float %input |
11 | 11 | %y = freeze float %x
|
12 |
| - %z = fadd reassoc nsz arcp contract afn float %y, 1.000000e+00 |
| 12 | + %z = fneg reassoc nsz arcp contract afn float %y |
13 | 13 | ret float %z
|
14 | 14 | }
|
15 | 15 |
|
16 |
| -define float @freeze_fadd_nnan(float %input) nounwind { |
17 |
| -; GFX11-LABEL: freeze_fadd_nnan: |
| 16 | +define <8 x float> @freeze_fneg_vec(<8 x float> %input) nounwind { |
| 17 | +; GFX11-LABEL: freeze_fneg_vec: |
18 | 18 | ; GFX11: ; %bb.0: ; %entry
|
19 | 19 | ; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
20 |
| -; GFX11-NEXT: v_add_f32_e32 v0, 1.0, v0 |
21 |
| -; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) |
22 |
| -; GFX11-NEXT: v_add_f32_e32 v0, 1.0, v0 |
23 | 20 | ; GFX11-NEXT: s_setpc_b64 s[30:31]
|
24 | 21 | entry:
|
25 |
| - %x = fadd nnan contract float %input, 1.000000e+00 |
| 22 | + %x = fneg <8 x float> %input |
| 23 | + %y = freeze <8 x float> %x |
| 24 | + %z = fneg <8 x float> %y |
| 25 | + ret <8 x float> %z |
| 26 | +} |
| 27 | + |
| 28 | +define float @freeze_fadd(float %input) nounwind { |
| 29 | +; GFX11-LABEL: freeze_fadd: |
| 30 | +; GFX11: ; %bb.0: ; %entry |
| 31 | +; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 32 | +; GFX11-NEXT: v_add_f32_e32 v0, 2.0, v0 |
| 33 | +; GFX11-NEXT: s_setpc_b64 s[30:31] |
| 34 | +entry: |
| 35 | + %x = fadd reassoc nsz arcp contract afn float %input, 1.000000e+00 |
26 | 36 | %y = freeze float %x
|
27 |
| - %z = fadd nnan contract float %y, 1.000000e+00 |
| 37 | + %z = fadd reassoc nsz arcp contract afn float %y, 1.000000e+00 |
28 | 38 | ret float %z
|
29 | 39 | }
|
30 | 40 |
|
@@ -57,21 +67,6 @@ entry:
|
57 | 67 | ret float %z
|
58 | 68 | }
|
59 | 69 |
|
60 |
| -define float @freeze_fsub_nnan(float %input) nounwind { |
61 |
| -; GFX11-LABEL: freeze_fsub_nnan: |
62 |
| -; GFX11: ; %bb.0: ; %entry |
63 |
| -; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
64 |
| -; GFX11-NEXT: v_subrev_f32_e32 v0, 1.0, v0 |
65 |
| -; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) |
66 |
| -; GFX11-NEXT: v_subrev_f32_e32 v0, 1.0, v0 |
67 |
| -; GFX11-NEXT: s_setpc_b64 s[30:31] |
68 |
| -entry: |
69 |
| - %x = fsub nnan contract float %input, 1.000000e+00 |
70 |
| - %y = freeze float %x |
71 |
| - %z = fsub nnan contract float %y, 1.000000e+00 |
72 |
| - ret float %z |
73 |
| -} |
74 |
| - |
75 | 70 | define <4 x float> @freeze_fsub_vec(<4 x float> %input) nounwind {
|
76 | 71 | ; GFX11-LABEL: freeze_fsub_vec:
|
77 | 72 | ; GFX11: ; %bb.0: ; %entry
|
@@ -99,21 +94,6 @@ entry:
|
99 | 94 | ret float %z
|
100 | 95 | }
|
101 | 96 |
|
102 |
| -define float @freeze_fmul_nnan(float %input) nounwind { |
103 |
| -; GFX11-LABEL: freeze_fmul_nnan: |
104 |
| -; GFX11: ; %bb.0: ; %entry |
105 |
| -; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
106 |
| -; GFX11-NEXT: v_add_f32_e32 v0, v0, v0 |
107 |
| -; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) |
108 |
| -; GFX11-NEXT: v_add_f32_e32 v0, v0, v0 |
109 |
| -; GFX11-NEXT: s_setpc_b64 s[30:31] |
110 |
| -entry: |
111 |
| - %x = fmul nnan contract float %input, 2.000000e+00 |
112 |
| - %y = freeze float %x |
113 |
| - %z = fmul nnan contract float %y, 2.000000e+00 |
114 |
| - ret float %z |
115 |
| -} |
116 |
| - |
117 | 97 | define <8 x float> @freeze_fmul_vec(<8 x float> %input) nounwind {
|
118 | 98 | ; GFX11-LABEL: freeze_fmul_vec:
|
119 | 99 | ; GFX11: ; %bb.0: ; %entry
|
@@ -143,21 +123,6 @@ entry:
|
143 | 123 | ret float %z
|
144 | 124 | }
|
145 | 125 |
|
146 |
| -define float @freeze_fdiv_nnan(float %input) nounwind { |
147 |
| -; GFX11-LABEL: freeze_fdiv_nnan: |
148 |
| -; GFX11: ; %bb.0: ; %entry |
149 |
| -; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
150 |
| -; GFX11-NEXT: v_mul_f32_e32 v0, 0.5, v0 |
151 |
| -; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) |
152 |
| -; GFX11-NEXT: v_mul_f32_e32 v0, 0.5, v0 |
153 |
| -; GFX11-NEXT: s_setpc_b64 s[30:31] |
154 |
| -entry: |
155 |
| - %x = fdiv nnan contract float %input, 2.000000e+00 |
156 |
| - %y = freeze float %x |
157 |
| - %z = fdiv nnan contract float %y, 2.000000e+00 |
158 |
| - ret float %z |
159 |
| -} |
160 |
| - |
161 | 126 | define <8 x float> @freeze_fdiv_vec(<8 x float> %input) nounwind {
|
162 | 127 | ; GFX11-LABEL: freeze_fdiv_vec:
|
163 | 128 | ; GFX11: ; %bb.0: ; %entry
|
@@ -195,30 +160,6 @@ entry:
|
195 | 160 | ret float %z
|
196 | 161 | }
|
197 | 162 |
|
198 |
| -define float @freeze_frem_nnan(float %input) nounwind { |
199 |
| -; GFX11-LABEL: freeze_frem_nnan: |
200 |
| -; GFX11: ; %bb.0: ; %entry |
201 |
| -; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
202 |
| -; GFX11-NEXT: v_mul_f32_e32 v1, 0.5, v0 |
203 |
| -; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1) |
204 |
| -; GFX11-NEXT: v_trunc_f32_e32 v1, v1 |
205 |
| -; GFX11-NEXT: v_fma_f32 v1, -2.0, v1, v0 |
206 |
| -; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1) |
207 |
| -; GFX11-NEXT: v_bfi_b32 v1, 0x7fffffff, v1, v0 |
208 |
| -; GFX11-NEXT: v_mul_f32_e32 v2, 0.5, v1 |
209 |
| -; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1) |
210 |
| -; GFX11-NEXT: v_trunc_f32_e32 v2, v2 |
211 |
| -; GFX11-NEXT: v_fmac_f32_e32 v1, -2.0, v2 |
212 |
| -; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) |
213 |
| -; GFX11-NEXT: v_bfi_b32 v0, 0x7fffffff, v1, v0 |
214 |
| -; GFX11-NEXT: s_setpc_b64 s[30:31] |
215 |
| -entry: |
216 |
| - %x = frem nnan contract float %input, 2.000000e+00 |
217 |
| - %y = freeze float %x |
218 |
| - %z = frem nnan contract float %y, 2.000000e+00 |
219 |
| - ret float %z |
220 |
| -} |
221 |
| - |
222 | 163 | define <8 x float> @freeze_frem_vec(<8 x float> %input) nounwind {
|
223 | 164 | ; GFX11-LABEL: freeze_frem_vec:
|
224 | 165 | ; GFX11: ; %bb.0: ; %entry
|
|
0 commit comments