[clang] [llvm] [HLSL] Add HLSL unpack intrinsics (PR #228518)

via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 5 15:01:54 PDT 2026


================
@@ -0,0 +1,21 @@
+// RUN: %clang_cc1 -finclude-default-header  -x hlsl  -triple dxil-pc-shadermodel6.6-library %s \
+// RUN:  -emit-llvm -disable-llvm-passes -fnative-int16-type -fnative-half-type -o - | \
+// RUN:  FileCheck %s -check-prefix=CHECK,CHECK-DXIL
+// RUN: %clang_cc1 -finclude-default-header  -x hlsl  -triple spirv-pc-vulkan-library %s \
+// RUN:  -emit-llvm -disable-llvm-passes -fnative-int16-type -fnative-half-type -o - | \
+// RUN:  FileCheck %s -check-prefix=CHECK,CHECK-SPV
+
+// CHECK: define {{.*}} <4 x i16> @_Z10test_u8u16u15uint8_t4_packed
----------------
joaosaffran wrote:

I'd avoid matching the full mangled name here.
```suggestion
// CHECK-LABEL: define {{.*}} <4 x i16> {{.*}}test_u8u16
```

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


More information about the cfe-commits mailing list