llvmorg-github-actions[bot] wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-hlsl

Author: Dan Brown (danbrown-amd)

<details>
<summary>Changes</summary>

Addresses #<!-- -->184507, #<!-- -->184508, #<!-- -->184509, #<!-- -->184492, 
#<!-- -->184495, #<!-- -->184496, #<!-- -->184497, #<!-- -->184499, #<!-- 
-->184500, #<!-- -->184501, #<!-- -->184502, #<!-- -->184503, #<!-- -->184515, 
#<!-- -->184517, #<!-- -->184518, #<!-- -->184519, #<!-- -->184520, #<!-- 
-->184521, #<!-- -->184522

Assisted-by: Claude Sonnet 4

---

Patch is 165.49 KiB, truncated to 20.00 KiB below, full version: 
https://github.com/llvm/llvm-project/pull/202455.diff


20 Files Affected:

- (modified) clang/include/clang/Basic/HLSLIntrinsics.td (-19) 
- (added) clang/test/CodeGenHLSL/builtins/acos_mat.hlsl (+181) 
- (added) clang/test/CodeGenHLSL/builtins/asin_mat.hlsl (+181) 
- (added) clang/test/CodeGenHLSL/builtins/atan_mat.hlsl (+181) 
- (added) clang/test/CodeGenHLSL/builtins/ceil_mat.hlsl (+181) 
- (added) clang/test/CodeGenHLSL/builtins/cos_mat.hlsl (+181) 
- (added) clang/test/CodeGenHLSL/builtins/cosh_mat.hlsl (+181) 
- (added) clang/test/CodeGenHLSL/builtins/exp2_mat.hlsl (+181) 
- (added) clang/test/CodeGenHLSL/builtins/exp_mat.hlsl (+181) 
- (added) clang/test/CodeGenHLSL/builtins/floor_mat.hlsl (+181) 
- (added) clang/test/CodeGenHLSL/builtins/log10_mat.hlsl (+180) 
- (added) clang/test/CodeGenHLSL/builtins/log2_mat.hlsl (+180) 
- (added) clang/test/CodeGenHLSL/builtins/log_mat.hlsl (+180) 
- (added) clang/test/CodeGenHLSL/builtins/round_mat.hlsl (+181) 
- (added) clang/test/CodeGenHLSL/builtins/sin_mat.hlsl (+181) 
- (added) clang/test/CodeGenHLSL/builtins/sinh_mat.hlsl (+181) 
- (added) clang/test/CodeGenHLSL/builtins/sqrt_mat.hlsl (+181) 
- (added) clang/test/CodeGenHLSL/builtins/tan_mat.hlsl (+181) 
- (added) clang/test/CodeGenHLSL/builtins/tanh_mat.hlsl (+181) 
- (added) clang/test/CodeGenHLSL/builtins/trunc_mat.hlsl (+181) 


``````````diff
diff --git a/clang/include/clang/Basic/HLSLIntrinsics.td 
b/clang/include/clang/Basic/HLSLIntrinsics.td
index 6084a6f92180e..be9f6d3c32d83 100644
--- a/clang/include/clang/Basic/HLSLIntrinsics.td
+++ b/clang/include/clang/Basic/HLSLIntrinsics.td
@@ -349,7 +349,6 @@ def hlsl_acos : HLSLOneArgBuiltin<"acos", 
"__builtin_elementwise_acos"> {
 \param Val The input value.
 }];
   let VaryingTypes = [HalfTy, FloatTy];
-  let VaryingMatDims = [];
 }
 
 // Implements unsigned 64-bit integer addition using pairs of unsigned 32-bit
@@ -432,7 +431,6 @@ def hlsl_asin : HLSLOneArgBuiltin<"asin", 
"__builtin_elementwise_asin"> {
 \param Val The input value.
 }];
   let VaryingTypes = [HalfTy, FloatTy];
-  let VaryingMatDims = [];
 }
 
 // Returns the arctangent of the input value, Val.
@@ -443,7 +441,6 @@ def hlsl_atan : HLSLOneArgBuiltin<"atan", 
"__builtin_elementwise_atan"> {
 \param Val The input value.
 }];
   let VaryingTypes = [HalfTy, FloatTy];
-  let VaryingMatDims = [];
 }
 
 // Returns the arctangent of y/x, using the signs of the arguments to determine
@@ -469,7 +466,6 @@ the input value, \a Val.
 \param Val The input value.
 }];
   let VaryingTypes = [HalfTy, FloatTy];
-  let VaryingMatDims = [];
 }
 
 // Checks whether the value is fully mapped.
@@ -524,7 +520,6 @@ def hlsl_cos : HLSLOneArgBuiltin<"cos", 
"__builtin_elementwise_cos"> {
 \param Val The input value.
 }];
   let VaryingTypes = [HalfTy, FloatTy];
-  let VaryingMatDims = [];
 }
 
 // Returns the hyperbolic cosine of the input value, Val.
@@ -535,7 +530,6 @@ def hlsl_cosh : HLSLOneArgBuiltin<"cosh", 
"__builtin_elementwise_cosh"> {
 \param Val The input value.
 }];
   let VaryingTypes = [HalfTy, FloatTy];
-  let VaryingMatDims = [];
 }
 
 // Returns the number of bits (per component) set in the input integer.
@@ -826,7 +820,6 @@ def hlsl_exp : HLSLOneArgBuiltin<"exp", 
"__builtin_elementwise_exp"> {
 The return value is the base-e exponential of the \a x parameter.
 }];
   let VaryingTypes = [HalfTy, FloatTy];
-  let VaryingMatDims = [];
 }
 
 // Returns the base 2 exponential, or 2**x, of the specified value.
@@ -839,7 +832,6 @@ def hlsl_exp2 : HLSLOneArgBuiltin<"exp2", 
"__builtin_elementwise_exp2"> {
 The base 2 exponential of the \a x parameter.
 }];
   let VaryingTypes = [HalfTy, FloatTy];
-  let VaryingMatDims = [];
 }
 
 // Returns the half value stored in the low 16 bits of the uint arg converted
@@ -934,7 +926,6 @@ value, \a Val.
 \param Val The input value.
 }];
   let VaryingTypes = [HalfTy, FloatTy];
-  let VaryingMatDims = [];
 }
 
 // Returns the floating-point remainder of x/y (scalar overloads).
@@ -1202,7 +1193,6 @@ If \a Val is negative, this result is undefined. If \a 
Val is 0, this
 function returns negative infinity.
 }];
   let VaryingTypes = [HalfTy, FloatTy];
-  let VaryingMatDims = [];
 }
 
 // Returns the base-10 logarithm of the input value, Val.
@@ -1216,7 +1206,6 @@ If \a Val is negative, this result is undefined. If \a 
Val is 0, this
 function returns negative infinity.
 }];
   let VaryingTypes = [HalfTy, FloatTy];
-  let VaryingMatDims = [];
 }
 
 // Returns the base-2 logarithm of the input value, Val.
@@ -1230,7 +1219,6 @@ If \a Val is negative, this result is undefined. If \a 
Val is 0, this
 function returns negative infinity.
 }];
   let VaryingTypes = [HalfTy, FloatTy];
-  let VaryingMatDims = [];
 }
 
 // Returns the result of M * A + B (multiply-add).
@@ -1457,7 +1445,6 @@ within a floating-point type. Halfway cases are
 rounded to the nearest even value.
 }];
   let VaryingTypes = [HalfTy, FloatTy];
-  let VaryingMatDims = [];
 }
 
 // Returns the reciprocal of the square root of the specified value,
@@ -1509,7 +1496,6 @@ def hlsl_sin : HLSLOneArgBuiltin<"sin", 
"__builtin_elementwise_sin"> {
 \param Val The input value.
 }];
   let VaryingTypes = [HalfTy, FloatTy];
-  let VaryingMatDims = [];
 }
 
 // Returns the hyperbolic sine of the input value, Val.
@@ -1520,7 +1506,6 @@ def hlsl_sinh : HLSLOneArgBuiltin<"sinh", 
"__builtin_elementwise_sinh"> {
 \param Val The input value.
 }];
   let VaryingTypes = [HalfTy, FloatTy];
-  let VaryingMatDims = [];
 }
 
 // Returns a smooth Hermite interpolation between 0 and 1.
@@ -1550,7 +1535,6 @@ def hlsl_sqrt : HLSLOneArgBuiltin<"sqrt", 
"__builtin_elementwise_sqrt"> {
 \param Val The input value.
 }];
   let VaryingTypes = [HalfTy, FloatTy];
-  let VaryingMatDims = [];
 }
 
 // Returns 1 if the x parameter is greater than or equal to the y parameter;
@@ -1577,7 +1561,6 @@ def hlsl_tan : HLSLOneArgBuiltin<"tan", 
"__builtin_elementwise_tan"> {
 \param Val The input value.
 }];
   let VaryingTypes = [HalfTy, FloatTy];
-  let VaryingMatDims = [];
 }
 
 // Returns the hyperbolic tangent of the input value, Val.
@@ -1588,7 +1571,6 @@ def hlsl_tanh : HLSLOneArgBuiltin<"tanh", 
"__builtin_elementwise_tanh"> {
 \param Val The input value.
 }];
   let VaryingTypes = [HalfTy, FloatTy];
-  let VaryingMatDims = [];
 }
 
 // Returns the truncated integer value of the input value, Val.
@@ -1599,7 +1581,6 @@ def hlsl_trunc : HLSLOneArgBuiltin<"trunc", 
"__builtin_elementwise_trunc"> {
 \param Val The input value.
 }];
   let VaryingTypes = [HalfTy, FloatTy];
-  let VaryingMatDims = [];
 }
 
 // Evaluates a value for all active invocations in the group. The result is 
true
diff --git a/clang/test/CodeGenHLSL/builtins/acos_mat.hlsl 
b/clang/test/CodeGenHLSL/builtins/acos_mat.hlsl
new file mode 100644
index 0000000000000..e83f38f53a3b8
--- /dev/null
+++ b/clang/test/CodeGenHLSL/builtins/acos_mat.hlsl
@@ -0,0 +1,181 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN:   dxil-pc-shadermodel6.3-library %s -fnative-half-type 
-fnative-int16-type \
+// RUN:   -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
+// RUN:   --check-prefixes=CHECK,NATIVE_HALF
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN:   dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
+// RUN:   -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN:   spirv-unknown-vulkan-compute %s -fnative-half-type 
-fnative-int16-type \
+// RUN:   -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
+// RUN:   --check-prefixes=CHECK,NATIVE_HALF
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN:   spirv-unknown-vulkan-compute %s -emit-llvm -disable-llvm-passes \
+// RUN:   -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF
+
+// CHECK-LABEL: test_acos_float1x2
+// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.acos.v2f32
+// CHECK: ret <2 x float>
+float1x2 test_acos_float1x2(float1x2 p0) { return acos(p0); }
+
+// CHECK-LABEL: test_acos_float1x3
+// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.acos.v3f32
+// CHECK: ret <3 x float>
+float1x3 test_acos_float1x3(float1x3 p0) { return acos(p0); }
+
+// CHECK-LABEL: test_acos_float1x4
+// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.acos.v4f32
+// CHECK: ret <4 x float>
+float1x4 test_acos_float1x4(float1x4 p0) { return acos(p0); }
+
+// CHECK-LABEL: test_acos_float2x1
+// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.acos.v2f32
+// CHECK: ret <2 x float>
+float2x1 test_acos_float2x1(float2x1 p0) { return acos(p0); }
+
+// CHECK-LABEL: test_acos_float2x2
+// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.acos.v4f32
+// CHECK: ret <4 x float>
+float2x2 test_acos_float2x2(float2x2 p0) { return acos(p0); }
+
+// CHECK-LABEL: test_acos_float2x3
+// CHECK: call reassoc nnan ninf nsz arcp afn <6 x float> @llvm.acos.v6f32
+// CHECK: ret <6 x float>
+float2x3 test_acos_float2x3(float2x3 p0) { return acos(p0); }
+
+// CHECK-LABEL: test_acos_float2x4
+// CHECK: call reassoc nnan ninf nsz arcp afn <8 x float> @llvm.acos.v8f32
+// CHECK: ret <8 x float>
+float2x4 test_acos_float2x4(float2x4 p0) { return acos(p0); }
+
+// CHECK-LABEL: test_acos_float3x1
+// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.acos.v3f32
+// CHECK: ret <3 x float>
+float3x1 test_acos_float3x1(float3x1 p0) { return acos(p0); }
+
+// CHECK-LABEL: test_acos_float3x2
+// CHECK: call reassoc nnan ninf nsz arcp afn <6 x float> @llvm.acos.v6f32
+// CHECK: ret <6 x float>
+float3x2 test_acos_float3x2(float3x2 p0) { return acos(p0); }
+
+// CHECK-LABEL: test_acos_float3x3
+// CHECK: call reassoc nnan ninf nsz arcp afn <9 x float> @llvm.acos.v9f32
+// CHECK: ret <9 x float>
+float3x3 test_acos_float3x3(float3x3 p0) { return acos(p0); }
+
+// CHECK-LABEL: test_acos_float3x4
+// CHECK: call reassoc nnan ninf nsz arcp afn <12 x float> @llvm.acos.v12f32
+// CHECK: ret <12 x float>
+float3x4 test_acos_float3x4(float3x4 p0) { return acos(p0); }
+
+// CHECK-LABEL: test_acos_float4x1
+// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.acos.v4f32
+// CHECK: ret <4 x float>
+float4x1 test_acos_float4x1(float4x1 p0) { return acos(p0); }
+
+// CHECK-LABEL: test_acos_float4x2
+// CHECK: call reassoc nnan ninf nsz arcp afn <8 x float> @llvm.acos.v8f32
+// CHECK: ret <8 x float>
+float4x2 test_acos_float4x2(float4x2 p0) { return acos(p0); }
+
+// CHECK-LABEL: test_acos_float4x3
+// CHECK: call reassoc nnan ninf nsz arcp afn <12 x float> @llvm.acos.v12f32
+// CHECK: ret <12 x float>
+float4x3 test_acos_float4x3(float4x3 p0) { return acos(p0); }
+
+// CHECK-LABEL: test_acos_float4x4
+// CHECK: call reassoc nnan ninf nsz arcp afn <16 x float> @llvm.acos.v16f32
+// CHECK: ret <16 x float>
+float4x4 test_acos_float4x4(float4x4 p0) { return acos(p0); }
+
+
+// CHECK-LABEL: test_acos_half1x2
+// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <2 x half> @llvm.acos.v2f16
+// NO_HALF: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.acos.v2f32
+// CHECK: ret <2 x {{half|float}}>
+half1x2 test_acos_half1x2(half1x2 p0) { return acos(p0); }
+
+// CHECK-LABEL: test_acos_half1x3
+// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <3 x half> @llvm.acos.v3f16
+// NO_HALF: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.acos.v3f32
+// CHECK: ret <3 x {{half|float}}>
+half1x3 test_acos_half1x3(half1x3 p0) { return acos(p0); }
+
+// CHECK-LABEL: test_acos_half1x4
+// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <4 x half> @llvm.acos.v4f16
+// NO_HALF: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.acos.v4f32
+// CHECK: ret <4 x {{half|float}}>
+half1x4 test_acos_half1x4(half1x4 p0) { return acos(p0); }
+
+// CHECK-LABEL: test_acos_half2x1
+// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <2 x half> @llvm.acos.v2f16
+// NO_HALF: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.acos.v2f32
+// CHECK: ret <2 x {{half|float}}>
+half2x1 test_acos_half2x1(half2x1 p0) { return acos(p0); }
+
+// CHECK-LABEL: test_acos_half2x2
+// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <4 x half> @llvm.acos.v4f16
+// NO_HALF: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.acos.v4f32
+// CHECK: ret <4 x {{half|float}}>
+half2x2 test_acos_half2x2(half2x2 p0) { return acos(p0); }
+
+// CHECK-LABEL: test_acos_half2x3
+// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <6 x half> @llvm.acos.v6f16
+// NO_HALF: call reassoc nnan ninf nsz arcp afn <6 x float> @llvm.acos.v6f32
+// CHECK: ret <6 x {{half|float}}>
+half2x3 test_acos_half2x3(half2x3 p0) { return acos(p0); }
+
+// CHECK-LABEL: test_acos_half2x4
+// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <8 x half> @llvm.acos.v8f16
+// NO_HALF: call reassoc nnan ninf nsz arcp afn <8 x float> @llvm.acos.v8f32
+// CHECK: ret <8 x {{half|float}}>
+half2x4 test_acos_half2x4(half2x4 p0) { return acos(p0); }
+
+// CHECK-LABEL: test_acos_half3x1
+// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <3 x half> @llvm.acos.v3f16
+// NO_HALF: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.acos.v3f32
+// CHECK: ret <3 x {{half|float}}>
+half3x1 test_acos_half3x1(half3x1 p0) { return acos(p0); }
+
+// CHECK-LABEL: test_acos_half3x2
+// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <6 x half> @llvm.acos.v6f16
+// NO_HALF: call reassoc nnan ninf nsz arcp afn <6 x float> @llvm.acos.v6f32
+// CHECK: ret <6 x {{half|float}}>
+half3x2 test_acos_half3x2(half3x2 p0) { return acos(p0); }
+
+// CHECK-LABEL: test_acos_half3x3
+// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <9 x half> @llvm.acos.v9f16
+// NO_HALF: call reassoc nnan ninf nsz arcp afn <9 x float> @llvm.acos.v9f32
+// CHECK: ret <9 x {{half|float}}>
+half3x3 test_acos_half3x3(half3x3 p0) { return acos(p0); }
+
+// CHECK-LABEL: test_acos_half3x4
+// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <12 x half> 
@llvm.acos.v12f16
+// NO_HALF: call reassoc nnan ninf nsz arcp afn <12 x float> @llvm.acos.v12f32
+// CHECK: ret <12 x {{half|float}}>
+half3x4 test_acos_half3x4(half3x4 p0) { return acos(p0); }
+
+// CHECK-LABEL: test_acos_half4x1
+// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <4 x half> @llvm.acos.v4f16
+// NO_HALF: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.acos.v4f32
+// CHECK: ret <4 x {{half|float}}>
+half4x1 test_acos_half4x1(half4x1 p0) { return acos(p0); }
+
+// CHECK-LABEL: test_acos_half4x2
+// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <8 x half> @llvm.acos.v8f16
+// NO_HALF: call reassoc nnan ninf nsz arcp afn <8 x float> @llvm.acos.v8f32
+// CHECK: ret <8 x {{half|float}}>
+half4x2 test_acos_half4x2(half4x2 p0) { return acos(p0); }
+
+// CHECK-LABEL: test_acos_half4x3
+// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <12 x half> 
@llvm.acos.v12f16
+// NO_HALF: call reassoc nnan ninf nsz arcp afn <12 x float> @llvm.acos.v12f32
+// CHECK: ret <12 x {{half|float}}>
+half4x3 test_acos_half4x3(half4x3 p0) { return acos(p0); }
+
+// CHECK-LABEL: test_acos_half4x4
+// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <16 x half> 
@llvm.acos.v16f16
+// NO_HALF: call reassoc nnan ninf nsz arcp afn <16 x float> @llvm.acos.v16f32
+// CHECK: ret <16 x {{half|float}}>
+half4x4 test_acos_half4x4(half4x4 p0) { return acos(p0); }
+
diff --git a/clang/test/CodeGenHLSL/builtins/asin_mat.hlsl 
b/clang/test/CodeGenHLSL/builtins/asin_mat.hlsl
new file mode 100644
index 0000000000000..a453dcfec4860
--- /dev/null
+++ b/clang/test/CodeGenHLSL/builtins/asin_mat.hlsl
@@ -0,0 +1,181 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN:   dxil-pc-shadermodel6.3-library %s -fnative-half-type 
-fnative-int16-type \
+// RUN:   -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
+// RUN:   --check-prefixes=CHECK,NATIVE_HALF
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN:   dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
+// RUN:   -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN:   spirv-unknown-vulkan-compute %s -fnative-half-type 
-fnative-int16-type \
+// RUN:   -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
+// RUN:   --check-prefixes=CHECK,NATIVE_HALF
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN:   spirv-unknown-vulkan-compute %s -emit-llvm -disable-llvm-passes \
+// RUN:   -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF
+
+// CHECK-LABEL: test_asin_float1x2
+// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.asin.v2f32
+// CHECK: ret <2 x float>
+float1x2 test_asin_float1x2(float1x2 p0) { return asin(p0); }
+
+// CHECK-LABEL: test_asin_float1x3
+// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.asin.v3f32
+// CHECK: ret <3 x float>
+float1x3 test_asin_float1x3(float1x3 p0) { return asin(p0); }
+
+// CHECK-LABEL: test_asin_float1x4
+// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.asin.v4f32
+// CHECK: ret <4 x float>
+float1x4 test_asin_float1x4(float1x4 p0) { return asin(p0); }
+
+// CHECK-LABEL: test_asin_float2x1
+// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.asin.v2f32
+// CHECK: ret <2 x float>
+float2x1 test_asin_float2x1(float2x1 p0) { return asin(p0); }
+
+// CHECK-LABEL: test_asin_float2x2
+// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.asin.v4f32
+// CHECK: ret <4 x float>
+float2x2 test_asin_float2x2(float2x2 p0) { return asin(p0); }
+
+// CHECK-LABEL: test_asin_float2x3
+// CHECK: call reassoc nnan ninf nsz arcp afn <6 x float> @llvm.asin.v6f32
+// CHECK: ret <6 x float>
+float2x3 test_asin_float2x3(float2x3 p0) { return asin(p0); }
+
+// CHECK-LABEL: test_asin_float2x4
+// CHECK: call reassoc nnan ninf nsz arcp afn <8 x float> @llvm.asin.v8f32
+// CHECK: ret <8 x float>
+float2x4 test_asin_float2x4(float2x4 p0) { return asin(p0); }
+
+// CHECK-LABEL: test_asin_float3x1
+// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.asin.v3f32
+// CHECK: ret <3 x float>
+float3x1 test_asin_float3x1(float3x1 p0) { return asin(p0); }
+
+// CHECK-LABEL: test_asin_float3x2
+// CHECK: call reassoc nnan ninf nsz arcp afn <6 x float> @llvm.asin.v6f32
+// CHECK: ret <6 x float>
+float3x2 test_asin_float3x2(float3x2 p0) { return asin(p0); }
+
+// CHECK-LABEL: test_asin_float3x3
+// CHECK: call reassoc nnan ninf nsz arcp afn <9 x float> @llvm.asin.v9f32
+// CHECK: ret <9 x float>
+float3x3 test_asin_float3x3(float3x3 p0) { return asin(p0); }
+
+// CHECK-LABEL: test_asin_float3x4
+// CHECK: call reassoc nnan ninf nsz arcp afn <12 x float> @llvm.asin.v12f32
+// CHECK: ret <12 x float>
+float3x4 test_asin_float3x4(float3x4 p0) { return asin(p0); }
+
+// CHECK-LABEL: test_asin_float4x1
+// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.asin.v4f32
+// CHECK: ret <4 x float>
+float4x1 test_asin_float4x1(float4x1 p0) { return asin(p0); }
+
+// CHECK-LABEL: test_asin_float4x2
+// CHECK: call reassoc nnan ninf nsz arcp afn <8 x float> @llvm.asin.v8f32
+// CHECK: ret <8 x float>
+float4x2 test_asin_float4x2(float4x2 p0) { return asin(p0); }
+
+// CHECK-LABEL: test_asin_float4x3
+// CHECK: call reassoc nnan ninf nsz arcp afn <12 x float> @llvm.asin.v12f32
+// CHECK: ret <12 x float>
+float4x3 test_asin_float4x3(float4x3 p0) { return asin(p0); }
+
+// CHECK-LABEL: test_asin_float4x4
+// CHECK: call reassoc nnan ninf nsz arcp afn <16 x float> @llvm.asin.v16f32
+// CHECK: ret <16 x float>
+float4x4 test_asin_float4x4(float4x4 p0) { return asin(p0); }
+
+
+// CHECK-LABEL: test_asin_half1x2
+// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <2 x half> @llvm.asin.v2f16
+// NO_HALF: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.asin.v2f32
+// CHECK: ret <2 x {{half|float}}>
+half1x2 test_asin_half1x2(half1x2 p0) { return asin(p0); }
+
+// CHECK-LABEL: test_asin_half1x3
+// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <3 x half> @llvm.asin.v3f16
+// NO_HALF: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.asin.v3f32
+// CHECK: ret <3 x {{half|float}}>
+half1x3 test_asin_half1x3(half1x3 p0) { return asin(p0); }
+
+// CHECK-LABEL: test_asin_half1x4
+// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <4 x half> @llvm.asin.v4f16
+// NO_HALF: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.asin.v4f32
+// CHECK: ret <4 x {{half|float}}>
+half1x4 test_asin_half1x4(half1x4 p0) { return asin(p0); }
+
+// CHECK-LABEL: test_asin_half2x1
+// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <2 x half> @llvm.asin.v2f16
+// NO_HALF: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.asin.v2f32
+// CHECK: ret <2 x {{half|float}}>
+half2x1 test_asin_half2x1(half2x1 p0) { return asin(p0); }
+
+// CHECK-LABEL: test_asin_half2x2
+// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <4 x half> @llvm.asin.v4f16
+// NO_HALF: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.asin.v4f32
+// CHECK: ret <4 x {{half|float}}>
+half2x2 test_asin_half2x2(half2x2 p0) { return asin(p0); }
+
+// CHECK-LABEL: test_asin_half2x3
+// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <6 x half> @llvm.asin.v6f16
+// NO_HALF: call reassoc nnan ninf nsz arcp afn <6 x float> @llvm.asin.v6f32
+// CHECK: ret <6 x {{half|float}}>
+half2x3 test_asin_half2x3(half2x3 p0) { return asin(p0); }
+
+// CHECK-LABEL: test_asin_half2x4
+// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <8 x half> @llvm.asin.v8f16
+// NO_HALF: call reassoc nnan ninf nsz arcp afn <8 x float> @llvm.asin.v8f32
+// CHECK: ret <8 x {{half|float}}>
+half2x4 test_asin_half2x4(half2x4 p0) { return asin(p0); }
+
+// CHECK-LABEL: test_asin_half3x1
+// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <3 x half> @llvm.asin.v3f16
+// NO_HALF: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.asin.v3f32
+// CHECK: ret <3 x {{half|float}}>
+half3x1 test_asin_half3x1(half3x1 p0) { ...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/202455
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to