| 1 |
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 2 |
| 2 |
// RUN: %clang_cc1 -triple x86_64-linux-gnu -frounding-math -ffp-exception-behavior=strict -O2 -emit-llvm -o - %s | FileCheck %s |
| 3 |
|
| 4 |
// FIXME: This demonstrates elementwise builtins are broken for strictfp and |
| 5 |
// produce unconstrained intrinsics |
| 6 |
|
| 7 |
typedef float float4 __attribute__((ext_vector_type(4))); |
| 8 |
|
| 9 |
// Sanity check we're getting constrained ops for a non-builtin. |
| 10 |
// CHECK-LABEL: define dso_local noundef <4 x float> @_Z11strict_faddDv4_fS_ |
| 11 |
// CHECK-SAME: (<4 x float> noundef [[A:%.*]], <4 x float> noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] { |
| 12 |
// CHECK-NEXT: entry: |
| 13 |
// CHECK-NEXT: [[ADD:%.*]] = tail call <4 x float> @llvm.experimental.constrained.fadd.v4f32(<4 x float> [[A]], <4 x float> [[B]], metadata !"round.dynamic", metadata !"fpexcept.strict") #[[ATTR4:[0-9]+]] |
| 14 |
// CHECK-NEXT: ret <4 x float> [[ADD]] |
| 15 |
// |
| 16 |
float4 strict_fadd(float4 a, float4 b) { |
| 17 |
return a + b; |
| 18 |
} |
| 19 |
|
| 20 |
// CHECK-LABEL: define dso_local noundef <4 x float> @_Z22strict_elementwise_absDv4_f |
| 21 |
// CHECK-SAME: (<4 x float> noundef [[A:%.*]]) local_unnamed_addr #[[ATTR2:[0-9]+]] { |
| 22 |
// CHECK-NEXT: entry: |
| 23 |
// CHECK-NEXT: [[ELT_ABS:%.*]] = tail call <4 x float> @llvm.fabs.v4f32(<4 x float> [[A]]) #[[ATTR4]] |
| 24 |
// CHECK-NEXT: ret <4 x float> [[ELT_ABS]] |
| 25 |
// |
| 26 |
float4 strict_elementwise_abs(float4 a) { |
| 27 |
return __builtin_elementwise_abs(a); |
| 28 |
} |
| 29 |
|
| 30 |
// CHECK-LABEL: define dso_local noundef <4 x float> @_Z22strict_elementwise_maxDv4_fS_ |
| 31 |
// CHECK-SAME: (<4 x float> noundef [[A:%.*]], <4 x float> noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 32 |
// CHECK-NEXT: entry: |
| 33 |
// CHECK-NEXT: [[ELT_MAX:%.*]] = tail call <4 x float> @llvm.experimental.constrained.maxnum.v4f32(<4 x float> [[A]], <4 x float> [[B]], metadata !"fpexcept.strict") #[[ATTR4]] |
| 34 |
// CHECK-NEXT: ret <4 x float> [[ELT_MAX]] |
| 35 |
// |
| 36 |
float4 strict_elementwise_max(float4 a, float4 b) { |
| 37 |
return __builtin_elementwise_max(a, b); |
| 38 |
} |
| 39 |
|
| 40 |
// CHECK-LABEL: define dso_local noundef <4 x float> @_Z22strict_elementwise_minDv4_fS_ |
| 41 |
// CHECK-SAME: (<4 x float> noundef [[A:%.*]], <4 x float> noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 42 |
// CHECK-NEXT: entry: |
| 43 |
// CHECK-NEXT: [[ELT_MIN:%.*]] = tail call <4 x float> @llvm.experimental.constrained.minnum.v4f32(<4 x float> [[A]], <4 x float> [[B]], metadata !"fpexcept.strict") #[[ATTR4]] |
| 44 |
// CHECK-NEXT: ret <4 x float> [[ELT_MIN]] |
| 45 |
// |
| 46 |
float4 strict_elementwise_min(float4 a, float4 b) { |
| 47 |
return __builtin_elementwise_min(a, b); |
| 48 |
} |
| 49 |
|
| 50 |
// CHECK-LABEL: define dso_local noundef <4 x float> @_Z26strict_elementwise_maximumDv4_fS_ |
| 51 |
// CHECK-SAME: (<4 x float> noundef [[A:%.*]], <4 x float> noundef [[B:%.*]]) local_unnamed_addr #[[ATTR2]] { |
| 52 |
// CHECK-NEXT: entry: |
| 53 |
// CHECK-NEXT: [[ELT_MAXIMUM:%.*]] = tail call <4 x float> @llvm.maximum.v4f32(<4 x float> [[A]], <4 x float> [[B]]) #[[ATTR4]] |
| 54 |
// CHECK-NEXT: ret <4 x float> [[ELT_MAXIMUM]] |
| 55 |
// |
| 56 |
float4 strict_elementwise_maximum(float4 a, float4 b) { |
| 57 |
return __builtin_elementwise_maximum(a, b); |
| 58 |
} |
| 59 |
|
| 60 |
// CHECK-LABEL: define dso_local noundef <4 x float> @_Z26strict_elementwise_minimumDv4_fS_ |
| 61 |
// CHECK-SAME: (<4 x float> noundef [[A:%.*]], <4 x float> noundef [[B:%.*]]) local_unnamed_addr #[[ATTR2]] { |
| 62 |
// CHECK-NEXT: entry: |
| 63 |
// CHECK-NEXT: [[ELT_MINIMUM:%.*]] = tail call <4 x float> @llvm.minimum.v4f32(<4 x float> [[A]], <4 x float> [[B]]) #[[ATTR4]] |
| 64 |
// CHECK-NEXT: ret <4 x float> [[ELT_MINIMUM]] |
| 65 |
// |
| 66 |
float4 strict_elementwise_minimum(float4 a, float4 b) { |
| 67 |
return __builtin_elementwise_minimum(a, b); |
| 68 |
} |
| 69 |
|
| 70 |
// CHECK-LABEL: define dso_local noundef <4 x float> @_Z23strict_elementwise_ceilDv4_f |
| 71 |
// CHECK-SAME: (<4 x float> noundef [[A:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 72 |
// CHECK-NEXT: entry: |
| 73 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <4 x float> @llvm.experimental.constrained.ceil.v4f32(<4 x float> [[A]], metadata !"fpexcept.strict") #[[ATTR4]] |
| 74 |
// CHECK-NEXT: ret <4 x float> [[TMP0]] |
| 75 |
// |
| 76 |
float4 strict_elementwise_ceil(float4 a) { |
| 77 |
return __builtin_elementwise_ceil(a); |
| 78 |
} |
| 79 |
|
| 80 |
// CHECK-LABEL: define dso_local noundef <4 x float> @_Z23strict_elementwise_acosDv4_f |
| 81 |
// CHECK-SAME: (<4 x float> noundef [[A:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 82 |
// CHECK-NEXT: entry: |
| 83 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <4 x float> @llvm.experimental.constrained.acos.v4f32(<4 x float> [[A]], metadata !"round.dynamic", metadata !"fpexcept.strict") #[[ATTR4]] |
| 84 |
// CHECK-NEXT: ret <4 x float> [[TMP0]] |
| 85 |
// |
| 86 |
float4 strict_elementwise_acos(float4 a) { |
| 87 |
return __builtin_elementwise_acos(a); |
| 88 |
} |
| 89 |
|
| 90 |
// CHECK-LABEL: define dso_local noundef <4 x float> @_Z22strict_elementwise_cosDv4_f |
| 91 |
// CHECK-SAME: (<4 x float> noundef [[A:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 92 |
// CHECK-NEXT: entry: |
| 93 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <4 x float> @llvm.experimental.constrained.cos.v4f32(<4 x float> [[A]], metadata !"round.dynamic", metadata !"fpexcept.strict") #[[ATTR4]] |
| 94 |
// CHECK-NEXT: ret <4 x float> [[TMP0]] |
| 95 |
// |
| 96 |
float4 strict_elementwise_cos(float4 a) { |
| 97 |
return __builtin_elementwise_cos(a); |
| 98 |
} |
| 99 |
|
| 100 |
// CHECK-LABEL: define dso_local noundef <4 x float> @_Z23strict_elementwise_coshDv4_f |
| 101 |
// CHECK-SAME: (<4 x float> noundef [[A:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 102 |
// CHECK-NEXT: entry: |
| 103 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <4 x float> @llvm.experimental.constrained.cosh.v4f32(<4 x float> [[A]], metadata !"round.dynamic", metadata !"fpexcept.strict") #[[ATTR4]] |
| 104 |
// CHECK-NEXT: ret <4 x float> [[TMP0]] |
| 105 |
// |
| 106 |
float4 strict_elementwise_cosh(float4 a) { |
| 107 |
return __builtin_elementwise_cosh(a); |
| 108 |
} |
| 109 |
|
| 110 |
// CHECK-LABEL: define dso_local noundef <4 x float> @_Z22strict_elementwise_expDv4_f |
| 111 |
// CHECK-SAME: (<4 x float> noundef [[A:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 112 |
// CHECK-NEXT: entry: |
| 113 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <4 x float> @llvm.experimental.constrained.exp.v4f32(<4 x float> [[A]], metadata !"round.dynamic", metadata !"fpexcept.strict") #[[ATTR4]] |
| 114 |
// CHECK-NEXT: ret <4 x float> [[TMP0]] |
| 115 |
// |
| 116 |
float4 strict_elementwise_exp(float4 a) { |
| 117 |
return __builtin_elementwise_exp(a); |
| 118 |
} |
| 119 |
|
| 120 |
// CHECK-LABEL: define dso_local noundef <4 x float> @_Z23strict_elementwise_exp2Dv4_f |
| 121 |
// CHECK-SAME: (<4 x float> noundef [[A:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 122 |
// CHECK-NEXT: entry: |
| 123 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <4 x float> @llvm.experimental.constrained.exp2.v4f32(<4 x float> [[A]], metadata !"round.dynamic", metadata !"fpexcept.strict") #[[ATTR4]] |
| 124 |
// CHECK-NEXT: ret <4 x float> [[TMP0]] |
| 125 |
// |
| 126 |
float4 strict_elementwise_exp2(float4 a) { |
| 127 |
return __builtin_elementwise_exp2(a); |
| 128 |
} |
| 129 |
|
| 130 |
// CHECK-LABEL: define dso_local noundef <4 x float> @_Z24strict_elementwise_floorDv4_f |
| 131 |
// CHECK-SAME: (<4 x float> noundef [[A:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 132 |
// CHECK-NEXT: entry: |
| 133 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <4 x float> @llvm.experimental.constrained.floor.v4f32(<4 x float> [[A]], metadata !"fpexcept.strict") #[[ATTR4]] |
| 134 |
// CHECK-NEXT: ret <4 x float> [[TMP0]] |
| 135 |
// |
| 136 |
float4 strict_elementwise_floor(float4 a) { |
| 137 |
return __builtin_elementwise_floor(a); |
| 138 |
} |
| 139 |
|
| 140 |
// CHECK-LABEL: define dso_local noundef <4 x float> @_Z22strict_elementwise_logDv4_f |
| 141 |
// CHECK-SAME: (<4 x float> noundef [[A:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 142 |
// CHECK-NEXT: entry: |
| 143 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <4 x float> @llvm.experimental.constrained.log.v4f32(<4 x float> [[A]], metadata !"round.dynamic", metadata !"fpexcept.strict") #[[ATTR4]] |
| 144 |
// CHECK-NEXT: ret <4 x float> [[TMP0]] |
| 145 |
// |
| 146 |
float4 strict_elementwise_log(float4 a) { |
| 147 |
return __builtin_elementwise_log(a); |
| 148 |
} |
| 149 |
|
| 150 |
// CHECK-LABEL: define dso_local noundef <4 x float> @_Z23strict_elementwise_log2Dv4_f |
| 151 |
// CHECK-SAME: (<4 x float> noundef [[A:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 152 |
// CHECK-NEXT: entry: |
| 153 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <4 x float> @llvm.experimental.constrained.log2.v4f32(<4 x float> [[A]], metadata !"round.dynamic", metadata !"fpexcept.strict") #[[ATTR4]] |
| 154 |
// CHECK-NEXT: ret <4 x float> [[TMP0]] |
| 155 |
// |
| 156 |
float4 strict_elementwise_log2(float4 a) { |
| 157 |
return __builtin_elementwise_log2(a); |
| 158 |
} |
| 159 |
|
| 160 |
// CHECK-LABEL: define dso_local noundef <4 x float> @_Z24strict_elementwise_log10Dv4_f |
| 161 |
// CHECK-SAME: (<4 x float> noundef [[A:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 162 |
// CHECK-NEXT: entry: |
| 163 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <4 x float> @llvm.experimental.constrained.log2.v4f32(<4 x float> [[A]], metadata !"round.dynamic", metadata !"fpexcept.strict") #[[ATTR4]] |
| 164 |
// CHECK-NEXT: ret <4 x float> [[TMP0]] |
| 165 |
// |
| 166 |
float4 strict_elementwise_log10(float4 a) { |
| 167 |
return __builtin_elementwise_log2(a); |
| 168 |
} |
| 169 |
|
| 170 |
// CHECK-LABEL: define dso_local noundef <4 x float> @_Z28strict_elementwise_roundevenDv4_f |
| 171 |
// CHECK-SAME: (<4 x float> noundef [[A:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 172 |
// CHECK-NEXT: entry: |
| 173 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <4 x float> @llvm.experimental.constrained.roundeven.v4f32(<4 x float> [[A]], metadata !"fpexcept.strict") #[[ATTR4]] |
| 174 |
// CHECK-NEXT: ret <4 x float> [[TMP0]] |
| 175 |
// |
| 176 |
float4 strict_elementwise_roundeven(float4 a) { |
| 177 |
return __builtin_elementwise_roundeven(a); |
| 178 |
} |
| 179 |
|
| 180 |
// CHECK-LABEL: define dso_local noundef <4 x float> @_Z24strict_elementwise_roundDv4_f |
| 181 |
// CHECK-SAME: (<4 x float> noundef [[A:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 182 |
// CHECK-NEXT: entry: |
| 183 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <4 x float> @llvm.experimental.constrained.round.v4f32(<4 x float> [[A]], metadata !"fpexcept.strict") #[[ATTR4]] |
| 184 |
// CHECK-NEXT: ret <4 x float> [[TMP0]] |
| 185 |
// |
| 186 |
float4 strict_elementwise_round(float4 a) { |
| 187 |
return __builtin_elementwise_round(a); |
| 188 |
} |
| 189 |
|
| 190 |
// CHECK-LABEL: define dso_local noundef <4 x float> @_Z23strict_elementwise_rintDv4_f |
| 191 |
// CHECK-SAME: (<4 x float> noundef [[A:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 192 |
// CHECK-NEXT: entry: |
| 193 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <4 x float> @llvm.experimental.constrained.rint.v4f32(<4 x float> [[A]], metadata !"round.dynamic", metadata !"fpexcept.strict") #[[ATTR4]] |
| 194 |
// CHECK-NEXT: ret <4 x float> [[TMP0]] |
| 195 |
// |
| 196 |
float4 strict_elementwise_rint(float4 a) { |
| 197 |
return __builtin_elementwise_rint(a); |
| 198 |
} |
| 199 |
|
| 200 |
// CHECK-LABEL: define dso_local noundef <4 x float> @_Z28strict_elementwise_nearbyintDv4_f |
| 201 |
// CHECK-SAME: (<4 x float> noundef [[A:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 202 |
// CHECK-NEXT: entry: |
| 203 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <4 x float> @llvm.experimental.constrained.nearbyint.v4f32(<4 x float> [[A]], metadata !"round.dynamic", metadata !"fpexcept.strict") #[[ATTR4]] |
| 204 |
// CHECK-NEXT: ret <4 x float> [[TMP0]] |
| 205 |
// |
| 206 |
float4 strict_elementwise_nearbyint(float4 a) { |
| 207 |
return __builtin_elementwise_nearbyint(a); |
| 208 |
} |
| 209 |
|
| 210 |
// CHECK-LABEL: define dso_local noundef <4 x float> @_Z23strict_elementwise_asinDv4_f |
| 211 |
// CHECK-SAME: (<4 x float> noundef [[A:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 212 |
// CHECK-NEXT: entry: |
| 213 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <4 x float> @llvm.experimental.constrained.asin.v4f32(<4 x float> [[A]], metadata !"round.dynamic", metadata !"fpexcept.strict") #[[ATTR4]] |
| 214 |
// CHECK-NEXT: ret <4 x float> [[TMP0]] |
| 215 |
// |
| 216 |
float4 strict_elementwise_asin(float4 a) { |
| 217 |
return __builtin_elementwise_asin(a); |
| 218 |
} |
| 219 |
|
| 220 |
// CHECK-LABEL: define dso_local noundef <4 x float> @_Z22strict_elementwise_sinDv4_f |
| 221 |
// CHECK-SAME: (<4 x float> noundef [[A:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 222 |
// CHECK-NEXT: entry: |
| 223 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <4 x float> @llvm.experimental.constrained.sin.v4f32(<4 x float> [[A]], metadata !"round.dynamic", metadata !"fpexcept.strict") #[[ATTR4]] |
| 224 |
// CHECK-NEXT: ret <4 x float> [[TMP0]] |
| 225 |
// |
| 226 |
float4 strict_elementwise_sin(float4 a) { |
| 227 |
return __builtin_elementwise_sin(a); |
| 228 |
} |
| 229 |
|
| 230 |
// CHECK-LABEL: define dso_local noundef <4 x float> @_Z23strict_elementwise_sinhDv4_f |
| 231 |
// CHECK-SAME: (<4 x float> noundef [[A:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 232 |
// CHECK-NEXT: entry: |
| 233 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <4 x float> @llvm.experimental.constrained.sinh.v4f32(<4 x float> [[A]], metadata !"round.dynamic", metadata !"fpexcept.strict") #[[ATTR4]] |
| 234 |
// CHECK-NEXT: ret <4 x float> [[TMP0]] |
| 235 |
// |
| 236 |
float4 strict_elementwise_sinh(float4 a) { |
| 237 |
return __builtin_elementwise_sinh(a); |
| 238 |
} |
| 239 |
|
| 240 |
// CHECK-LABEL: define dso_local noundef <4 x float> @_Z23strict_elementwise_sqrtDv4_f |
| 241 |
// CHECK-SAME: (<4 x float> noundef [[A:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 242 |
// CHECK-NEXT: entry: |
| 243 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <4 x float> @llvm.experimental.constrained.sqrt.v4f32(<4 x float> [[A]], metadata !"round.dynamic", metadata !"fpexcept.strict") #[[ATTR4]] |
| 244 |
// CHECK-NEXT: ret <4 x float> [[TMP0]] |
| 245 |
// |
| 246 |
float4 strict_elementwise_sqrt(float4 a) { |
| 247 |
return __builtin_elementwise_sqrt(a); |
| 248 |
} |
| 249 |
|
| 250 |
// CHECK-LABEL: define dso_local noundef <4 x float> @_Z23strict_elementwise_atanDv4_f |
| 251 |
// CHECK-SAME: (<4 x float> noundef [[A:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 252 |
// CHECK-NEXT: entry: |
| 253 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <4 x float> @llvm.experimental.constrained.atan.v4f32(<4 x float> [[A]], metadata !"round.dynamic", metadata !"fpexcept.strict") #[[ATTR4]] |
| 254 |
// CHECK-NEXT: ret <4 x float> [[TMP0]] |
| 255 |
// |
| 256 |
float4 strict_elementwise_atan(float4 a) { |
| 257 |
return __builtin_elementwise_atan(a); |
| 258 |
} |
| 259 |
|
| 260 |
// CHECK-LABEL: define dso_local noundef <4 x float> @_Z22strict_elementwise_tanDv4_f |
| 261 |
// CHECK-SAME: (<4 x float> noundef [[A:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 262 |
// CHECK-NEXT: entry: |
| 263 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <4 x float> @llvm.experimental.constrained.tan.v4f32(<4 x float> [[A]], metadata !"round.dynamic", metadata !"fpexcept.strict") #[[ATTR4]] |
| 264 |
// CHECK-NEXT: ret <4 x float> [[TMP0]] |
| 265 |
// |
| 266 |
float4 strict_elementwise_tan(float4 a) { |
| 267 |
return __builtin_elementwise_tan(a); |
| 268 |
} |
| 269 |
|
| 270 |
// CHECK-LABEL: define dso_local noundef <4 x float> @_Z23strict_elementwise_tanhDv4_f |
| 271 |
// CHECK-SAME: (<4 x float> noundef [[A:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 272 |
// CHECK-NEXT: entry: |
| 273 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <4 x float> @llvm.experimental.constrained.tanh.v4f32(<4 x float> [[A]], metadata !"round.dynamic", metadata !"fpexcept.strict") #[[ATTR4]] |
| 274 |
// CHECK-NEXT: ret <4 x float> [[TMP0]] |
| 275 |
// |
| 276 |
float4 strict_elementwise_tanh(float4 a) { |
| 277 |
return __builtin_elementwise_tanh(a); |
| 278 |
} |
| 279 |
|
| 280 |
// CHECK-LABEL: define dso_local noundef <4 x float> @_Z24strict_elementwise_atan2Dv4_fS_ |
| 281 |
// CHECK-SAME: (<4 x float> noundef [[A:%.*]], <4 x float> noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 282 |
// CHECK-NEXT: entry: |
| 283 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <4 x float> @llvm.experimental.constrained.atan2.v4f32(<4 x float> [[A]], <4 x float> [[B]], metadata !"round.dynamic", metadata !"fpexcept.strict") #[[ATTR4]] |
| 284 |
// CHECK-NEXT: ret <4 x float> [[TMP0]] |
| 285 |
// |
| 286 |
float4 strict_elementwise_atan2(float4 a, float4 b) { |
| 287 |
return __builtin_elementwise_atan2(a, b); |
| 288 |
} |
| 289 |
|
| 290 |
// CHECK-LABEL: define dso_local noundef <4 x float> @_Z24strict_elementwise_truncDv4_f |
| 291 |
// CHECK-SAME: (<4 x float> noundef [[A:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 292 |
// CHECK-NEXT: entry: |
| 293 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <4 x float> @llvm.experimental.constrained.trunc.v4f32(<4 x float> [[A]], metadata !"fpexcept.strict") #[[ATTR4]] |
| 294 |
// CHECK-NEXT: ret <4 x float> [[TMP0]] |
| 295 |
// |
| 296 |
float4 strict_elementwise_trunc(float4 a) { |
| 297 |
return __builtin_elementwise_trunc(a); |
| 298 |
} |
| 299 |
|
| 300 |
// CHECK-LABEL: define dso_local noundef <4 x float> @_Z22strict_elementwise_fmaDv4_fS_S_ |
| 301 |
// CHECK-SAME: (<4 x float> noundef [[A:%.*]], <4 x float> noundef [[B:%.*]], <4 x float> noundef [[C:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 302 |
// CHECK-NEXT: entry: |
| 303 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <4 x float> @llvm.experimental.constrained.fma.v4f32(<4 x float> [[A]], <4 x float> [[B]], <4 x float> [[C]], metadata !"round.dynamic", metadata !"fpexcept.strict") #[[ATTR4]] |
| 304 |
// CHECK-NEXT: ret <4 x float> [[TMP0]] |
| 305 |
// |
| 306 |
float4 strict_elementwise_fma(float4 a, float4 b, float4 c) { |
| 307 |
return __builtin_elementwise_fma(a, b, c); |
| 308 |
} |
| 309 |
|
| 310 |
// CHECK-LABEL: define dso_local noundef <4 x float> @_Z22strict_elementwise_powDv4_fS_ |
| 311 |
// CHECK-SAME: (<4 x float> noundef [[A:%.*]], <4 x float> noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 312 |
// CHECK-NEXT: entry: |
| 313 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <4 x float> @llvm.experimental.constrained.pow.v4f32(<4 x float> [[A]], <4 x float> [[B]], metadata !"round.dynamic", metadata !"fpexcept.strict") #[[ATTR4]] |
| 314 |
// CHECK-NEXT: ret <4 x float> [[TMP0]] |
| 315 |
// |
| 316 |
float4 strict_elementwise_pow(float4 a, float4 b) { |
| 317 |
return __builtin_elementwise_pow(a, b); |
| 318 |
} |
| 319 |
|
| 320 |
// CHECK-LABEL: define dso_local noundef <4 x float> @_Z23strict_elementwise_fmodDv4_fS_ |
| 321 |
// CHECK-SAME: (<4 x float> noundef [[A:%.*]], <4 x float> noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 322 |
// CHECK-NEXT: entry: |
| 323 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <4 x float> @llvm.experimental.constrained.frem.v4f32(<4 x float> [[A]], <4 x float> [[B]], metadata !"round.dynamic", metadata !"fpexcept.strict") #[[ATTR4]] |
| 324 |
// CHECK-NEXT: ret <4 x float> [[TMP0]] |
| 325 |
// |
| 326 |
float4 strict_elementwise_fmod(float4 a, float4 b) { |
| 327 |
return __builtin_elementwise_fmod(a, b); |
| 328 |
} |