Matt Arsenault | c3dc8e6 | 2018-08-03 18:27:52 +0000 | [diff] [blame] | 1 | ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py |
| 2 | ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=fiji -verify-machineinstrs < %s | FileCheck -enable-var-scope -check-prefix=GCN %s |
| 3 | |
| 4 | ; Mostly overlaps with fmed3.ll to stress specific cases of |
| 5 | ; isKnownNeverSNaN. |
| 6 | |
| 7 | define float @v_test_known_not_snan_fabs_input_fmed3_r_i_i_f32(float %a) #0 { |
| 8 | ; GCN-LABEL: v_test_known_not_snan_fabs_input_fmed3_r_i_i_f32: |
| 9 | ; GCN: ; %bb.0: |
| 10 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 11 | ; GCN-NEXT: v_rcp_f32_e32 v0, v0 |
| 12 | ; GCN-NEXT: v_med3_f32 v0, |v0|, 2.0, 4.0 |
| 13 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 14 | %a.nnan.add = fdiv nnan float 1.0, %a |
| 15 | %known.not.snan = call float @llvm.fabs.f32(float %a.nnan.add) |
| 16 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 17 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 18 | ret float %med |
| 19 | } |
| 20 | |
| 21 | define float @v_test_known_not_snan_fneg_input_fmed3_r_i_i_f32(float %a) #0 { |
| 22 | ; GCN-LABEL: v_test_known_not_snan_fneg_input_fmed3_r_i_i_f32: |
| 23 | ; GCN: ; %bb.0: |
| 24 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 25 | ; GCN-NEXT: v_rcp_f32_e64 v0, -v0 |
| 26 | ; GCN-NEXT: v_med3_f32 v0, v0, 2.0, 4.0 |
| 27 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 28 | %a.nnan.add = fdiv nnan float 1.0, %a |
| 29 | %known.not.snan = fsub float -0.0, %a.nnan.add |
| 30 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 31 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 32 | ret float %med |
| 33 | } |
| 34 | |
| 35 | define float @v_test_known_not_snan_fpext_input_fmed3_r_i_i_f32(half %a) #0 { |
| 36 | ; GCN-LABEL: v_test_known_not_snan_fpext_input_fmed3_r_i_i_f32: |
| 37 | ; GCN: ; %bb.0: |
| 38 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 39 | ; GCN-NEXT: v_add_f16_e32 v0, 1.0, v0 |
| 40 | ; GCN-NEXT: v_cvt_f32_f16_e32 v0, v0 |
| 41 | ; GCN-NEXT: v_med3_f32 v0, v0, 2.0, 4.0 |
| 42 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 43 | %a.nnan.add = fadd nnan half %a, 1.0 |
| 44 | %known.not.snan = fpext half %a.nnan.add to float |
| 45 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 46 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 47 | ret float %med |
| 48 | } |
| 49 | |
| 50 | define float @v_test_known_not_snan_fptrunc_input_fmed3_r_i_i_f32(double %a) #0 { |
| 51 | ; GCN-LABEL: v_test_known_not_snan_fptrunc_input_fmed3_r_i_i_f32: |
| 52 | ; GCN: ; %bb.0: |
| 53 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 54 | ; GCN-NEXT: v_add_f64 v[0:1], v[0:1], 1.0 |
| 55 | ; GCN-NEXT: v_cvt_f32_f64_e32 v0, v[0:1] |
| 56 | ; GCN-NEXT: v_med3_f32 v0, v0, 2.0, 4.0 |
| 57 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 58 | %a.nnan.add = fadd nnan double %a, 1.0 |
| 59 | %known.not.snan = fptrunc double %a.nnan.add to float |
| 60 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 61 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 62 | ret float %med |
| 63 | } |
| 64 | |
| 65 | define float @v_test_known_not_snan_copysign_input_fmed3_r_i_i_f32(float %a, float %sign) #0 { |
| 66 | ; GCN-LABEL: v_test_known_not_snan_copysign_input_fmed3_r_i_i_f32: |
| 67 | ; GCN: ; %bb.0: |
| 68 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 69 | ; GCN-NEXT: v_rcp_f32_e32 v0, v0 |
| 70 | ; GCN-NEXT: s_brev_b32 s6, -2 |
| 71 | ; GCN-NEXT: v_bfi_b32 v0, s6, v0, v1 |
| 72 | ; GCN-NEXT: v_med3_f32 v0, v0, 2.0, 4.0 |
| 73 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 74 | %a.nnan.add = fdiv nnan float 1.0, %a |
| 75 | %known.not.snan = call float @llvm.copysign.f32(float %a.nnan.add, float %sign) |
| 76 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 77 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 78 | ret float %med |
| 79 | } |
| 80 | |
| 81 | ; Canonicalize always quiets, so nothing is necessary. |
| 82 | define float @v_test_known_canonicalize_input_fmed3_r_i_i_f32(float %a) #0 { |
| 83 | ; GCN-LABEL: v_test_known_canonicalize_input_fmed3_r_i_i_f32: |
| 84 | ; GCN: ; %bb.0: |
| 85 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 86 | ; GCN-NEXT: v_mul_f32_e32 v0, 1.0, v0 |
| 87 | ; GCN-NEXT: v_med3_f32 v0, v0, 2.0, 4.0 |
| 88 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 89 | %known.not.snan = call float @llvm.canonicalize.f32(float %a) |
| 90 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 91 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 92 | ret float %med |
| 93 | } |
| 94 | |
| 95 | define float @v_test_known_not_snan_minnum_input_fmed3_r_i_i_f32(float %a, float %b) #0 { |
| 96 | ; GCN-LABEL: v_test_known_not_snan_minnum_input_fmed3_r_i_i_f32: |
| 97 | ; GCN: ; %bb.0: |
| 98 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 99 | ; GCN-NEXT: v_rcp_f32_e32 v0, v0 |
| 100 | ; GCN-NEXT: v_add_f32_e32 v1, 1.0, v1 |
| 101 | ; GCN-NEXT: v_min_f32_e32 v0, v0, v1 |
| 102 | ; GCN-NEXT: v_max_f32_e32 v0, 2.0, v0 |
| 103 | ; GCN-NEXT: v_min_f32_e32 v0, 4.0, v0 |
| 104 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 105 | %a.nnan.add = fdiv nnan float 1.0, %a |
| 106 | %b.nnan.add = fadd nnan float %b, 1.0 |
| 107 | %known.not.snan = call float @llvm.minnum.f32(float %a.nnan.add, float %b.nnan.add) |
| 108 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 109 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 110 | ret float %med |
| 111 | } |
| 112 | |
| 113 | define float @v_minnum_possible_nan_lhs_input_fmed3_r_i_i_f32(float %a, float %b) #0 { |
| 114 | ; GCN-LABEL: v_minnum_possible_nan_lhs_input_fmed3_r_i_i_f32: |
| 115 | ; GCN: ; %bb.0: |
| 116 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 117 | ; GCN-NEXT: v_add_f32_e32 v1, 1.0, v1 |
| 118 | ; GCN-NEXT: v_min_f32_e32 v0, v0, v1 |
| 119 | ; GCN-NEXT: v_max_f32_e32 v0, 2.0, v0 |
| 120 | ; GCN-NEXT: v_min_f32_e32 v0, 4.0, v0 |
| 121 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 122 | %b.nnan.add = fadd nnan float %b, 1.0 |
| 123 | %known.not.snan = call float @llvm.minnum.f32(float %a, float %b.nnan.add) |
| 124 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 125 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 126 | ret float %med |
| 127 | } |
| 128 | |
| 129 | define float @v_minnum_possible_nan_rhs_input_fmed3_r_i_i_f32(float %a, float %b) #0 { |
| 130 | ; GCN-LABEL: v_minnum_possible_nan_rhs_input_fmed3_r_i_i_f32: |
| 131 | ; GCN: ; %bb.0: |
| 132 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 133 | ; GCN-NEXT: v_rcp_f32_e32 v0, v0 |
| 134 | ; GCN-NEXT: v_min_f32_e32 v0, v0, v1 |
| 135 | ; GCN-NEXT: v_max_f32_e32 v0, 2.0, v0 |
| 136 | ; GCN-NEXT: v_min_f32_e32 v0, 4.0, v0 |
| 137 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 138 | %a.nnan.add = fdiv nnan float 1.0, %a |
| 139 | %known.not.snan = call float @llvm.minnum.f32(float %a.nnan.add, float %b) |
| 140 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 141 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 142 | ret float %med |
| 143 | } |
| 144 | |
| 145 | define float @v_test_known_not_snan_maxnum_input_fmed3_r_i_i_f32(float %a, float %b) #0 { |
| 146 | ; GCN-LABEL: v_test_known_not_snan_maxnum_input_fmed3_r_i_i_f32: |
| 147 | ; GCN: ; %bb.0: |
| 148 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 149 | ; GCN-NEXT: v_rcp_f32_e32 v0, v0 |
| 150 | ; GCN-NEXT: v_add_f32_e32 v1, 1.0, v1 |
| 151 | ; GCN-NEXT: v_max3_f32 v0, v0, v1, 2.0 |
| 152 | ; GCN-NEXT: v_min_f32_e32 v0, 4.0, v0 |
| 153 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 154 | %a.nnan.add = fdiv nnan float 1.0, %a |
| 155 | %b.nnan.add = fadd nnan float %b, 1.0 |
| 156 | %known.not.snan = call float @llvm.maxnum.f32(float %a.nnan.add, float %b.nnan.add) |
| 157 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 158 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 159 | ret float %med |
| 160 | } |
| 161 | |
| 162 | define float @v_maxnum_possible_nan_lhs_input_fmed3_r_i_i_f32(float %a, float %b) #0 { |
| 163 | ; GCN-LABEL: v_maxnum_possible_nan_lhs_input_fmed3_r_i_i_f32: |
| 164 | ; GCN: ; %bb.0: |
| 165 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 166 | ; GCN-NEXT: v_add_f32_e32 v1, 1.0, v1 |
| 167 | ; GCN-NEXT: v_max3_f32 v0, v0, v1, 2.0 |
| 168 | ; GCN-NEXT: v_min_f32_e32 v0, 4.0, v0 |
| 169 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 170 | %b.nnan.add = fadd nnan float %b, 1.0 |
| 171 | %known.not.snan = call float @llvm.maxnum.f32(float %a, float %b.nnan.add) |
| 172 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 173 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 174 | ret float %med |
| 175 | } |
| 176 | |
| 177 | define float @v_maxnum_possible_nan_rhs_input_fmed3_r_i_i_f32(float %a, float %b) #0 { |
| 178 | ; GCN-LABEL: v_maxnum_possible_nan_rhs_input_fmed3_r_i_i_f32: |
| 179 | ; GCN: ; %bb.0: |
| 180 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 181 | ; GCN-NEXT: v_rcp_f32_e32 v0, v0 |
| 182 | ; GCN-NEXT: v_max3_f32 v0, v0, v1, 2.0 |
| 183 | ; GCN-NEXT: v_min_f32_e32 v0, 4.0, v0 |
| 184 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 185 | %a.nnan.add = fdiv nnan float 1.0, %a |
| 186 | %known.not.snan = call float @llvm.maxnum.f32(float %a.nnan.add, float %b) |
| 187 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 188 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 189 | ret float %med |
| 190 | } |
| 191 | |
| 192 | define float @v_test_known_not_snan_select_input_fmed3_r_i_i_f32(float %a, float %b, i32 %c) #0 { |
| 193 | ; GCN-LABEL: v_test_known_not_snan_select_input_fmed3_r_i_i_f32: |
| 194 | ; GCN: ; %bb.0: |
| 195 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 196 | ; GCN-NEXT: v_rcp_f32_e32 v0, v0 |
| 197 | ; GCN-NEXT: v_add_f32_e32 v1, 1.0, v1 |
| 198 | ; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2 |
| 199 | ; GCN-NEXT: v_cndmask_b32_e32 v0, v1, v0, vcc |
| 200 | ; GCN-NEXT: v_med3_f32 v0, v0, 2.0, 4.0 |
| 201 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 202 | %a.nnan.add = fdiv nnan float 1.0, %a |
| 203 | %b.nnan.add = fadd nnan float %b, 1.0 |
| 204 | %cmp = icmp eq i32 %c, 0 |
| 205 | %known.not.snan = select i1 %cmp, float %a.nnan.add, float %b.nnan.add |
| 206 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 207 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 208 | ret float %med |
| 209 | } |
| 210 | |
| 211 | define float @v_select_possible_nan_lhs_input_fmed3_r_i_i_f32(float %a, float %b, i32 %c) #0 { |
| 212 | ; GCN-LABEL: v_select_possible_nan_lhs_input_fmed3_r_i_i_f32: |
| 213 | ; GCN: ; %bb.0: |
| 214 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 215 | ; GCN-NEXT: v_add_f32_e32 v1, 1.0, v1 |
| 216 | ; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2 |
| 217 | ; GCN-NEXT: v_cndmask_b32_e32 v0, v1, v0, vcc |
| 218 | ; GCN-NEXT: v_max_f32_e32 v0, 2.0, v0 |
| 219 | ; GCN-NEXT: v_min_f32_e32 v0, 4.0, v0 |
| 220 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 221 | %b.nnan.add = fadd nnan float %b, 1.0 |
| 222 | %cmp = icmp eq i32 %c, 0 |
| 223 | %known.not.snan = select i1 %cmp, float %a, float %b.nnan.add |
| 224 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 225 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 226 | ret float %med |
| 227 | } |
| 228 | |
| 229 | define float @v_select_possible_nan_rhs_input_fmed3_r_i_i_f32(float %a, float %b, i32 %c) #0 { |
| 230 | ; GCN-LABEL: v_select_possible_nan_rhs_input_fmed3_r_i_i_f32: |
| 231 | ; GCN: ; %bb.0: |
| 232 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 233 | ; GCN-NEXT: v_rcp_f32_e32 v0, v0 |
| 234 | ; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2 |
| 235 | ; GCN-NEXT: v_cndmask_b32_e32 v0, v1, v0, vcc |
| 236 | ; GCN-NEXT: v_max_f32_e32 v0, 2.0, v0 |
| 237 | ; GCN-NEXT: v_min_f32_e32 v0, 4.0, v0 |
| 238 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 239 | %a.nnan.add = fdiv nnan float 1.0, %a |
| 240 | %cmp = icmp eq i32 %c, 0 |
| 241 | %known.not.snan = select i1 %cmp, float %a.nnan.add, float %b |
| 242 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 243 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 244 | ret float %med |
| 245 | } |
| 246 | |
| 247 | define float @v_test_known_not_snan_fadd_input_fmed3_r_i_i_f32(float %a, float %b) #0 { |
| 248 | ; GCN-LABEL: v_test_known_not_snan_fadd_input_fmed3_r_i_i_f32: |
| 249 | ; GCN: ; %bb.0: |
| 250 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 251 | ; GCN-NEXT: v_add_f32_e32 v0, v0, v1 |
| 252 | ; GCN-NEXT: v_med3_f32 v0, v0, 2.0, 4.0 |
| 253 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 254 | %known.not.snan = fadd float %a, %b |
| 255 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 256 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 257 | ret float %med |
| 258 | } |
| 259 | |
| 260 | define float @v_test_known_not_snan_fsub_input_fmed3_r_i_i_f32(float %a, float %b) #0 { |
| 261 | ; GCN-LABEL: v_test_known_not_snan_fsub_input_fmed3_r_i_i_f32: |
| 262 | ; GCN: ; %bb.0: |
| 263 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 264 | ; GCN-NEXT: v_sub_f32_e32 v0, v0, v1 |
| 265 | ; GCN-NEXT: v_med3_f32 v0, v0, 2.0, 4.0 |
| 266 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 267 | %known.not.snan = fsub float %a, %b |
| 268 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 269 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 270 | ret float %med |
| 271 | } |
| 272 | |
| 273 | define float @v_test_known_not_snan_fmul_input_fmed3_r_i_i_f32(float %a, float %b) #0 { |
| 274 | ; GCN-LABEL: v_test_known_not_snan_fmul_input_fmed3_r_i_i_f32: |
| 275 | ; GCN: ; %bb.0: |
| 276 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 277 | ; GCN-NEXT: v_mul_f32_e32 v0, v0, v1 |
| 278 | ; GCN-NEXT: v_med3_f32 v0, v0, 2.0, 4.0 |
| 279 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 280 | %known.not.snan = fmul float %a, %b |
| 281 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 282 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 283 | ret float %med |
| 284 | } |
| 285 | |
| 286 | define float @v_test_known_not_snan_uint_to_fp_input_fmed3_r_i_i_f32(i32 %a) #0 { |
| 287 | ; GCN-LABEL: v_test_known_not_snan_uint_to_fp_input_fmed3_r_i_i_f32: |
| 288 | ; GCN: ; %bb.0: |
| 289 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 290 | ; GCN-NEXT: v_cvt_f32_u32_e32 v0, v0 |
| 291 | ; GCN-NEXT: v_med3_f32 v0, v0, 2.0, 4.0 |
| 292 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 293 | %known.not.snan = uitofp i32 %a to float |
| 294 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 295 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 296 | ret float %med |
| 297 | } |
| 298 | |
| 299 | define float @v_test_known_not_snan_sint_to_fp_input_fmed3_r_i_i_f32(i32 %a) #0 { |
| 300 | ; GCN-LABEL: v_test_known_not_snan_sint_to_fp_input_fmed3_r_i_i_f32: |
| 301 | ; GCN: ; %bb.0: |
| 302 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 303 | ; GCN-NEXT: v_cvt_f32_i32_e32 v0, v0 |
| 304 | ; GCN-NEXT: v_med3_f32 v0, v0, 2.0, 4.0 |
| 305 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 306 | %known.not.snan = sitofp i32 %a to float |
| 307 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 308 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 309 | ret float %med |
| 310 | } |
| 311 | |
| 312 | define float @v_test_known_not_snan_fma_input_fmed3_r_i_i_f32(float %a, float %b, float %c) #0 { |
| 313 | ; GCN-LABEL: v_test_known_not_snan_fma_input_fmed3_r_i_i_f32: |
| 314 | ; GCN: ; %bb.0: |
| 315 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 316 | ; GCN-NEXT: v_fma_f32 v0, v0, v1, v2 |
| 317 | ; GCN-NEXT: v_med3_f32 v0, v0, 2.0, 4.0 |
| 318 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 319 | %known.not.snan = call float @llvm.fma.f32(float %a, float %b, float %c) |
| 320 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 321 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 322 | ret float %med |
| 323 | } |
| 324 | |
| 325 | define float @v_test_known_not_snan_fmad_input_fmed3_r_i_i_f32(float %a, float %b, float %c) #0 { |
| 326 | ; GCN-LABEL: v_test_known_not_snan_fmad_input_fmed3_r_i_i_f32: |
| 327 | ; GCN: ; %bb.0: |
| 328 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 329 | ; GCN-NEXT: v_mac_f32_e32 v2, v0, v1 |
| 330 | ; GCN-NEXT: v_med3_f32 v0, v2, 2.0, 4.0 |
| 331 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 332 | %known.not.snan = call float @llvm.fmuladd.f32(float %a, float %b, float %c) |
| 333 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 334 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 335 | ret float %med |
| 336 | } |
| 337 | |
| 338 | |
| 339 | define float @v_test_known_not_snan_sin_input_fmed3_r_i_i_f32(float %a) #0 { |
| 340 | ; GCN-LABEL: v_test_known_not_snan_sin_input_fmed3_r_i_i_f32: |
| 341 | ; GCN: ; %bb.0: |
| 342 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 343 | ; GCN-NEXT: v_mul_f32_e32 v0, 0.15915494, v0 |
| 344 | ; GCN-NEXT: v_fract_f32_e32 v0, v0 |
| 345 | ; GCN-NEXT: v_sin_f32_e32 v0, v0 |
| 346 | ; GCN-NEXT: v_med3_f32 v0, v0, 2.0, 4.0 |
| 347 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 348 | %known.not.snan = call float @llvm.sin.f32(float %a) |
| 349 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 350 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 351 | ret float %med |
| 352 | } |
| 353 | |
| 354 | define float @v_test_known_not_snan_cos_input_fmed3_r_i_i_f32(float %a) #0 { |
| 355 | ; GCN-LABEL: v_test_known_not_snan_cos_input_fmed3_r_i_i_f32: |
| 356 | ; GCN: ; %bb.0: |
| 357 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 358 | ; GCN-NEXT: v_mul_f32_e32 v0, 0.15915494, v0 |
| 359 | ; GCN-NEXT: v_fract_f32_e32 v0, v0 |
| 360 | ; GCN-NEXT: v_cos_f32_e32 v0, v0 |
| 361 | ; GCN-NEXT: v_med3_f32 v0, v0, 2.0, 4.0 |
| 362 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 363 | %known.not.snan = call float @llvm.cos.f32(float %a) |
| 364 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 365 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 366 | ret float %med |
| 367 | } |
| 368 | |
| 369 | define float @v_test_known_not_snan_exp2_input_fmed3_r_i_i_f32(float %a) #0 { |
| 370 | ; GCN-LABEL: v_test_known_not_snan_exp2_input_fmed3_r_i_i_f32: |
| 371 | ; GCN: ; %bb.0: |
| 372 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 373 | ; GCN-NEXT: v_exp_f32_e32 v0, v0 |
| 374 | ; GCN-NEXT: v_med3_f32 v0, v0, 2.0, 4.0 |
| 375 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 376 | %known.not.snan = call float @llvm.exp2.f32(float %a) |
| 377 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 378 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 379 | ret float %med |
| 380 | } |
| 381 | |
| 382 | define float @v_test_known_not_snan_trunc_input_fmed3_r_i_i_f32(float %a) #0 { |
| 383 | ; GCN-LABEL: v_test_known_not_snan_trunc_input_fmed3_r_i_i_f32: |
| 384 | ; GCN: ; %bb.0: |
| 385 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 386 | ; GCN-NEXT: v_trunc_f32_e32 v0, v0 |
| 387 | ; GCN-NEXT: v_med3_f32 v0, v0, 2.0, 4.0 |
| 388 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 389 | %known.not.snan = call float @llvm.trunc.f32(float %a) |
| 390 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 391 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 392 | ret float %med |
| 393 | } |
| 394 | |
| 395 | define float @v_test_known_not_snan_floor_input_fmed3_r_i_i_f32(float %a) #0 { |
| 396 | ; GCN-LABEL: v_test_known_not_snan_floor_input_fmed3_r_i_i_f32: |
| 397 | ; GCN: ; %bb.0: |
| 398 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 399 | ; GCN-NEXT: v_floor_f32_e32 v0, v0 |
| 400 | ; GCN-NEXT: v_med3_f32 v0, v0, 2.0, 4.0 |
| 401 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 402 | %known.not.snan = call float @llvm.floor.f32(float %a) |
| 403 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 404 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 405 | ret float %med |
| 406 | } |
| 407 | |
| 408 | define float @v_test_known_not_snan_ceil_input_fmed3_r_i_i_f32(float %a) #0 { |
| 409 | ; GCN-LABEL: v_test_known_not_snan_ceil_input_fmed3_r_i_i_f32: |
| 410 | ; GCN: ; %bb.0: |
| 411 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 412 | ; GCN-NEXT: v_floor_f32_e32 v0, v0 |
| 413 | ; GCN-NEXT: v_med3_f32 v0, v0, 2.0, 4.0 |
| 414 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 415 | %known.not.snan = call float @llvm.floor.f32(float %a) |
| 416 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 417 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 418 | ret float %med |
| 419 | } |
| 420 | |
| 421 | define float @v_test_known_not_snan_round_input_fmed3_r_i_i_f32(float %a) #0 { |
| 422 | ; GCN-LABEL: v_test_known_not_snan_round_input_fmed3_r_i_i_f32: |
| 423 | ; GCN: ; %bb.0: |
| 424 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 425 | ; GCN-NEXT: s_brev_b32 s6, -2 |
| 426 | ; GCN-NEXT: v_trunc_f32_e32 v2, v0 |
| 427 | ; GCN-NEXT: v_bfi_b32 v1, s6, 1.0, v0 |
| 428 | ; GCN-NEXT: v_sub_f32_e32 v0, v0, v2 |
| 429 | ; GCN-NEXT: v_cmp_ge_f32_e64 vcc, |v0|, 0.5 |
| 430 | ; GCN-NEXT: v_cndmask_b32_e32 v0, 0, v1, vcc |
| 431 | ; GCN-NEXT: v_add_f32_e32 v0, v2, v0 |
| 432 | ; GCN-NEXT: v_med3_f32 v0, v0, 2.0, 4.0 |
| 433 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 434 | %known.not.snan = call float @llvm.round.f32(float %a) |
| 435 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 436 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 437 | ret float %med |
| 438 | } |
| 439 | |
| 440 | define float @v_test_known_not_snan_rint_input_fmed3_r_i_i_f32(float %a) #0 { |
| 441 | ; GCN-LABEL: v_test_known_not_snan_rint_input_fmed3_r_i_i_f32: |
| 442 | ; GCN: ; %bb.0: |
| 443 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 444 | ; GCN-NEXT: v_rndne_f32_e32 v0, v0 |
| 445 | ; GCN-NEXT: v_med3_f32 v0, v0, 2.0, 4.0 |
| 446 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 447 | %known.not.snan = call float @llvm.rint.f32(float %a) |
| 448 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 449 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 450 | ret float %med |
| 451 | } |
| 452 | |
| 453 | define float @v_test_known_not_snan_nearbyint_input_fmed3_r_i_i_f32(float %a) #0 { |
| 454 | ; GCN-LABEL: v_test_known_not_snan_nearbyint_input_fmed3_r_i_i_f32: |
| 455 | ; GCN: ; %bb.0: |
| 456 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 457 | ; GCN-NEXT: v_rndne_f32_e32 v0, v0 |
| 458 | ; GCN-NEXT: v_med3_f32 v0, v0, 2.0, 4.0 |
| 459 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 460 | %known.not.snan = call float @llvm.nearbyint.f32(float %a) |
| 461 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 462 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 463 | ret float %med |
| 464 | } |
| 465 | |
| 466 | define float @v_test_known_not_snan_fmul_legacy_input_fmed3_r_i_i_f32(float %a, float %b) #0 { |
| 467 | ; GCN-LABEL: v_test_known_not_snan_fmul_legacy_input_fmed3_r_i_i_f32: |
| 468 | ; GCN: ; %bb.0: |
| 469 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 470 | ; GCN-NEXT: v_mul_legacy_f32_e32 v0, v0, v1 |
| 471 | ; GCN-NEXT: v_med3_f32 v0, v0, 2.0, 4.0 |
| 472 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 473 | %known.not.snan = call float @llvm.amdgcn.fmul.legacy(float %a, float %b) |
| 474 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 475 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 476 | ret float %med |
| 477 | } |
| 478 | |
| 479 | define float @v_test_known_not_snan_ldexp_input_fmed3_r_i_i_f32(float %a, i32 %b) #0 { |
| 480 | ; GCN-LABEL: v_test_known_not_snan_ldexp_input_fmed3_r_i_i_f32: |
| 481 | ; GCN: ; %bb.0: |
| 482 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 483 | ; GCN-NEXT: v_ldexp_f32 v0, v0, v1 |
| 484 | ; GCN-NEXT: v_med3_f32 v0, v0, 2.0, 4.0 |
| 485 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 486 | %known.not.snan = call float @llvm.amdgcn.ldexp.f32(float %a, i32 %b) |
| 487 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 488 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 489 | ret float %med |
| 490 | } |
| 491 | |
| 492 | define float @v_test_known_not_snan_fmed3_input_fmed3_r_i_i_f32(float %a, float %b, float %c) #0 { |
| 493 | ; GCN-LABEL: v_test_known_not_snan_fmed3_input_fmed3_r_i_i_f32: |
| 494 | ; GCN: ; %bb.0: |
| 495 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 496 | ; GCN-NEXT: v_med3_f32 v0, v0, v1, v2 |
| 497 | ; GCN-NEXT: v_med3_f32 v0, v0, 2.0, 4.0 |
| 498 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 499 | %known.not.snan = call float @llvm.amdgcn.fmed3.f32(float %a, float %b, float %c) |
| 500 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 501 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 502 | ret float %med |
| 503 | } |
| 504 | |
| 505 | define float @v_test_known_not_snan_fmin3_input_fmed3_r_i_i_f32(float %a, float %b, float %c) #0 { |
| 506 | ; GCN-LABEL: v_test_known_not_snan_fmin3_input_fmed3_r_i_i_f32: |
| 507 | ; GCN: ; %bb.0: |
| 508 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 509 | ; GCN-NEXT: v_min3_f32 v0, v0, v1, v2 |
| 510 | ; GCN-NEXT: v_max_f32_e32 v0, 2.0, v0 |
| 511 | ; GCN-NEXT: v_min_f32_e32 v0, 4.0, v0 |
| 512 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 513 | %min0 = call float @llvm.minnum.f32(float %a, float %b) |
| 514 | %known.not.snan = call float @llvm.minnum.f32(float %min0, float %c) |
| 515 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 516 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 517 | ret float %med |
| 518 | } |
| 519 | |
| 520 | define float @v_test_known_not_snan_cvt_ubyte0_input_fmed3_r_i_i_f32(i8 %char) #0 { |
| 521 | ; GCN-LABEL: v_test_known_not_snan_cvt_ubyte0_input_fmed3_r_i_i_f32: |
| 522 | ; GCN: ; %bb.0: |
| 523 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 524 | ; GCN-NEXT: v_cvt_f32_ubyte0_e32 v0, v0 |
| 525 | ; GCN-NEXT: v_med3_f32 v0, v0, 2.0, 4.0 |
| 526 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 527 | %cvt = uitofp i8 %char to float |
| 528 | %max = call float @llvm.maxnum.f32(float %cvt, float 2.0) |
| 529 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 530 | ret float %med |
| 531 | } |
| 532 | |
| 533 | define float @v_test_not_known_frexp_mant_input_fmed3_r_i_i_f32(float %arg) #0 { |
| 534 | ; GCN-LABEL: v_test_not_known_frexp_mant_input_fmed3_r_i_i_f32: |
| 535 | ; GCN: ; %bb.0: |
| 536 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 537 | ; GCN-NEXT: v_frexp_mant_f32_e32 v0, v0 |
Matt Arsenault | d49ab0b | 2018-08-06 21:58:11 +0000 | [diff] [blame] | 538 | ; GCN-NEXT: v_med3_f32 v0, v0, 2.0, 4.0 |
Matt Arsenault | c3dc8e6 | 2018-08-03 18:27:52 +0000 | [diff] [blame] | 539 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 540 | %known.not.snan = call float @llvm.amdgcn.frexp.mant.f32(float %arg) |
| 541 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 542 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 543 | ret float %med |
| 544 | } |
| 545 | |
| 546 | define float @v_test_known_not_frexp_mant_input_fmed3_r_i_i_f32(float %arg) #0 { |
| 547 | ; GCN-LABEL: v_test_known_not_frexp_mant_input_fmed3_r_i_i_f32: |
| 548 | ; GCN: ; %bb.0: |
| 549 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 550 | ; GCN-NEXT: v_add_f32_e32 v0, 1.0, v0 |
| 551 | ; GCN-NEXT: v_frexp_mant_f32_e32 v0, v0 |
| 552 | ; GCN-NEXT: v_med3_f32 v0, v0, 2.0, 4.0 |
| 553 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 554 | %add = fadd float %arg, 1.0 |
| 555 | %known.not.snan = call float @llvm.amdgcn.frexp.mant.f32(float %add) |
| 556 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 557 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 558 | ret float %med |
| 559 | } |
| 560 | |
Matt Arsenault | d49ab0b | 2018-08-06 21:58:11 +0000 | [diff] [blame] | 561 | define float @v_test_known_not_snan_rcp_input_fmed3_r_i_i_f32(float %a) #0 { |
| 562 | ; GCN-LABEL: v_test_known_not_snan_rcp_input_fmed3_r_i_i_f32: |
| 563 | ; GCN: ; %bb.0: |
| 564 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 565 | ; GCN-NEXT: v_rcp_f32_e32 v0, v0 |
| 566 | ; GCN-NEXT: v_med3_f32 v0, v0, 2.0, 4.0 |
| 567 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 568 | %known.not.snan = call float @llvm.amdgcn.rcp.f32(float %a) |
| 569 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 570 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 571 | ret float %med |
| 572 | } |
| 573 | define float @v_test_known_not_snan_rsq_input_fmed3_r_i_i_f32(float %a) #0 { |
| 574 | ; GCN-LABEL: v_test_known_not_snan_rsq_input_fmed3_r_i_i_f32: |
| 575 | ; GCN: ; %bb.0: |
| 576 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 577 | ; GCN-NEXT: v_rsq_f32_e32 v0, v0 |
| 578 | ; GCN-NEXT: v_med3_f32 v0, v0, 2.0, 4.0 |
| 579 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 580 | %known.not.snan = call float @llvm.amdgcn.rsq.f32(float %a) |
| 581 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 582 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 583 | ret float %med |
| 584 | } |
| 585 | |
| 586 | define float @v_test_known_not_snan_fract_input_fmed3_r_i_i_f32(float %a) #0 { |
| 587 | ; GCN-LABEL: v_test_known_not_snan_fract_input_fmed3_r_i_i_f32: |
| 588 | ; GCN: ; %bb.0: |
| 589 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 590 | ; GCN-NEXT: v_fract_f32_e32 v0, v0 |
| 591 | ; GCN-NEXT: v_med3_f32 v0, v0, 2.0, 4.0 |
| 592 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 593 | %known.not.snan = call float @llvm.amdgcn.fract.f32(float %a) |
| 594 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 595 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 596 | ret float %med |
| 597 | } |
| 598 | |
Matt Arsenault | c3dc8e6 | 2018-08-03 18:27:52 +0000 | [diff] [blame] | 599 | define float @v_test_known_not_snan_cubeid_input_fmed3_r_i_i_f32(float %a, float %b, float %c) #0 { |
| 600 | ; GCN-LABEL: v_test_known_not_snan_cubeid_input_fmed3_r_i_i_f32: |
| 601 | ; GCN: ; %bb.0: |
| 602 | ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 603 | ; GCN-NEXT: v_cubeid_f32 v0, v0, v1, v2 |
| 604 | ; GCN-NEXT: v_med3_f32 v0, v0, 2.0, 4.0 |
| 605 | ; GCN-NEXT: s_setpc_b64 s[30:31] |
| 606 | %known.not.snan = call float @llvm.amdgcn.cubeid(float %a, float %b, float %c) |
| 607 | %max = call float @llvm.maxnum.f32(float %known.not.snan, float 2.0) |
| 608 | %med = call float @llvm.minnum.f32(float %max, float 4.0) |
| 609 | ret float %med |
| 610 | } |
| 611 | |
| 612 | declare float @llvm.fabs.f32(float) #1 |
| 613 | declare float @llvm.sin.f32(float) #1 |
| 614 | declare float @llvm.cos.f32(float) #1 |
| 615 | declare float @llvm.exp2.f32(float) #1 |
| 616 | declare float @llvm.trunc.f32(float) #1 |
| 617 | declare float @llvm.floor.f32(float) #1 |
| 618 | declare float @llvm.ceil.f32(float) #1 |
| 619 | declare float @llvm.round.f32(float) #1 |
| 620 | declare float @llvm.rint.f32(float) #1 |
| 621 | declare float @llvm.nearbyint.f32(float) #1 |
| 622 | declare float @llvm.canonicalize.f32(float) #1 |
| 623 | declare float @llvm.minnum.f32(float, float) #1 |
| 624 | declare float @llvm.maxnum.f32(float, float) #1 |
| 625 | declare float @llvm.copysign.f32(float, float) #1 |
| 626 | declare float @llvm.fma.f32(float, float, float) #1 |
| 627 | declare float @llvm.fmuladd.f32(float, float, float) #1 |
| 628 | declare float @llvm.amdgcn.ldexp.f32(float, i32) #1 |
| 629 | declare float @llvm.amdgcn.fmul.legacy(float, float) #1 |
| 630 | declare float @llvm.amdgcn.fmed3.f32(float, float, float) #1 |
| 631 | declare float @llvm.amdgcn.frexp.mant.f32(float) #1 |
Matt Arsenault | d49ab0b | 2018-08-06 21:58:11 +0000 | [diff] [blame] | 632 | declare float @llvm.amdgcn.rcp.f32(float) #1 |
| 633 | declare float @llvm.amdgcn.rsq.f32(float) #1 |
| 634 | declare float @llvm.amdgcn.fract.f32(float) #1 |
Matt Arsenault | c3dc8e6 | 2018-08-03 18:27:52 +0000 | [diff] [blame] | 635 | declare float @llvm.amdgcn.cubeid(float, float, float) #0 |
| 636 | |
| 637 | attributes #0 = { nounwind } |
| 638 | attributes #1 = { nounwind readnone speculatable } |