[clang] [HLSL] Add matrix support for isnan() and isinf() (PR #195586)

Dan Brown via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 10 10:57:38 PDT 2026


================
@@ -1,37 +1,37 @@
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
 // RUN:   dxil-pc-shadermodel6.3-library %s -emit-llvm \
-// RUN:   -Wdeprecated-declarations -o - | FileCheck %s --check-prefixes=CHECK \
-// RUN:   -DFNATTRS="hidden noundef" -DTARGET=dx
+// RUN:   -Wdeprecated-declarations -o - | FileCheck %s -DTARGET=dx
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
 // RUN:   spirv-unknown-vulkan-library %s -emit-llvm \
-// RUN:   -Wdeprecated-declarations -o - | FileCheck %s --check-prefixes=CHECK \
-// RUN:   -DFNATTRS="hidden spir_func noundef" -DTARGET=spv
-// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.3-library %s  \
-// RUN:   -verify -verify-ignore-unexpected=note
-// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple spirv-unknown-vulkan-library %s  \
-// RUN:   -verify -verify-ignore-unexpected=note
+// RUN:   -Wdeprecated-declarations -o - | FileCheck %s -DTARGET=spv
+// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
+// RUN:   dxil-pc-shadermodel6.3-library %s -verify \
+// RUN:   -verify-ignore-unexpected=note
+// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
+// RUN:   spirv-unknown-vulkan-library %s -verify \
+// RUN:   -verify-ignore-unexpected=note
 
-// CHECK: define [[FNATTRS]] i1 @_Z17test_isinf_doubled(
-// CHECK:    [[CONVI:%.*]] = fptrunc {{.*}} double %{{.*}} to float
-// CHECK:    [[HLSLISINFI:%.*]] = call noundef i1 @llvm.[[TARGET]].isinf.f32(float [[CONVI]])
-// CHECK:    ret i1 [[HLSLISINFI]]
-// expected-warning at +1 {{'isinf' is deprecated: In 202x 64 bit API lowering for fn is deprecated. Explicitly cast parameters to 32 or 16 bit types.}}
+// CHECK: define {{.*}} i1 @_Z17test_isinf_doubled(
+// CHECK:    [[CONV:%.*]] = fptrunc {{.*}} double %{{.*}} to float
+// CHECK:    [[RET:%.*]] = call noundef i1 @llvm.[[TARGET]].isinf.f32(float [[CONV]])
+// CHECK:    ret i1 [[RET]]
+// expected-warning at +1 {{'isinf' is deprecated: In 202x 64 bit API lowering for isinf is deprecated. Explicitly cast parameters to 32 or 16 bit types.}}
----------------
danbrown-amd wrote:

Backed out changes to both, aside from the expected warning; will submit another PR to make these tests consistent.

https://github.com/llvm/llvm-project/pull/195586


More information about the cfe-commits mailing list