================
@@ -79,3 +79,15 @@ double4 test_max_double4_mismatch(double4 p0, double p1) {
return max(p0, p1); }
// CHECK: [[MAX:%.*]] = call reassoc nnan ninf nsz arcp afn noundef
nofpclass(nan inf) <4 x double> @llvm.maxnum.v4f64(<4 x double> [[CONV1]], <4 x
double> %{{.*}})
// CHECK: ret <4 x double> [[MAX]]
double4 test_max_double4_mismatch2(double4 p0, double p1) { return max(p1,
p0); }
+
+// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float
{{.*}}test_max_float_int_mismatch
+// CHECK: [[CONV:%.*]] = sitofp reassoc nnan ninf nsz arcp afn i32 %{{.*}} to
float
+// CHECK: [[MAX:%.*]] = call reassoc nnan ninf nsz arcp afn noundef
nofpclass(nan inf) float @llvm.maxnum.f32(float {{%.*}}, float [[CONV]])
+// CHECK: ret float [[MAX]]
+float test_max_float_int_mismatch(float p0, int p1) { return max(p0, 1); }
----------------
Icohedron wrote:
```suggestion
float test_max_float_int_mismatch(float p0, int p1) { return max(p0, p1); }
```
https://github.com/llvm/llvm-project/pull/222746
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits