[clang] [HLSL][SPIR-V] Add `-fspv-enable-maximal-reconvergence` flag to clang dxc. (PR #163474)
Steven Perron via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 15 06:53:19 PDT 2025
================
@@ -243,6 +243,7 @@ ENUM_LANGOPT(HLSLVersion, HLSLLangStd, 16, HLSL_Unset, NotCompatible, "HLSL Vers
LANGOPT(HLSLStrictAvailability, 1, 0, NotCompatible,
"Strict availability diagnostic mode for HLSL built-in functions.")
LANGOPT(HLSLSpvUseUnknownImageFormat, 1, 0, NotCompatible, "For storage images and texel buffers, sets the default format to 'Unknown' when not specified via the `vk::image_format` attribute. If this option is not used, the format is inferred from the resource's data type.")
+LANGOPT(HLSLSpvEnableMaximalReconvergence, 1, 0, NotCompatible, "Enables maximal reconvergence for SPIR-V codegen. This ensures that all control flow merges at the nearest possible merge point as defined by the Vulkan spec.")
----------------
s-perron wrote:
Is "nearest possible merge point" the wording in the Vk/spir-v spec? I believe the issue was that without this exe mode, implementations can have the threads reconverge before the merge block. With this extension the threads are guaranteed to not reconverge until the merge block.
https://github.com/llvm/llvm-project/pull/163474
More information about the cfe-commits
mailing list