================
@@ -0,0 +1,682 @@
+// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm \
+// RUN: -o - | FileCheck %s --check-prefixes=CHECK -DFNATTRS="hidden noundef
nofpclass(nan inf)"
+// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
+// RUN: spirv-unknown-vulkan-compute %s -emit-llvm \
+// RUN: -o - | FileCheck %s --check-prefixes=CHECK -DFNATTRS="hidden
spir_func noundef nofpclass(nan inf)"
+
+// CHECK: define [[FNATTRS]] <2 x float> @_{{.*}}test_atan2_double1x2{{.*}}(
+// CHECK: [[CONVI:%.*]] = fptrunc {{.*}} <2 x double> %{{.*}} to <2 x float>
+// CHECK: [[CONV1I:%.*]] = fptrunc {{.*}} <2 x double> %{{.*}} to <2 x
float>
+// CHECK: [[V5:%.*]] = call {{.*}} <2 x float> @llvm.atan2.v2f32(<2 x
float> [[CONVI]], <2 x float> [[CONV1I]])
+// CHECK: ret <2 x float> [[V5]]
+float1x2 test_atan2_double1x2 (double1x2 p0, double1x2 p1) {
+ return atan2(p0, p1);
+}
----------------
farzonl wrote:
since your implementation is a template you don't need to cover so many cases
just do one matrix case per type.
https://github.com/llvm/llvm-project/pull/194984
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits