[clang] [llvm] [HLSL] Add QuadAll Emulation support (PR #240645)
Helena Kotas via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 13 00:18:58 PST 2026
================
@@ -0,0 +1,71 @@
+// DEFINE: %{deriv-ext} = +SPV_KHR_compute_shader_derivatives
+// DEFINE: %{quad-exts} = +SPV_KHR_quad_control,+SPV_KHR_maximal_reconvergence
+// RUN: %clang_cc1 -finclude-default-header -triple \
+// RUN: spirv-pc-vulkan-library %s -emit-llvm -disable-llvm-passes -o - \
+// RUN: | FileCheck %s --check-prefix=IR
+// RUN: %clang_cc1 -finclude-default-header -triple \
+// RUN: dxil-pc-shadermodel6.7-library %s -emit-llvm \
+// RUN: -disable-llvm-passes -o - | FileCheck %s --check-prefix=DXIL
+// RUN: %if spirv-registered-target %{ \
+// RUN: %clang_cc1 -finclude-default-header -triple \
+// RUN: spirv1.6-unknown-vulkan1.3-library -O3 -S %s -o - \
+// RUN: -mllvm -spirv-ext=%{deriv-ext},%{quad-exts} \
+// RUN: | FileCheck %s --check-prefixes=SPIRV,NATIVE %}
+// RUN: %if spirv-registered-target %{ \
+// RUN: %clang_cc1 -finclude-default-header -triple \
+// RUN: spirv1.6-unknown-vulkan1.3-library -O3 -S %s -o - \
+// RUN: -mllvm -spirv-ext=%{deriv-ext},-SPV_KHR_quad_control \
+// RUN: | FileCheck %s --check-prefixes=SPIRV,EMULATED \
+// RUN: --implicit-check-not=OpGroupNonUniformQuadAllKHR %}
----------------
hekota wrote:
The clang test should be just testing just that the IR has correct `!spirv.ExecutionMode` node. The tests that verify how `!spirv.ExecutionMode` is lowered to the SPIR-V `OpCapability` should already exist in the backend.
https://github.com/llvm/llvm-project/pull/240645
More information about the cfe-commits
mailing list