[clang] [HLSL][SPIR-V] Add `-fspv-enable-maximal-reconvergence` flag to clang dxc. (PR #163474)

Lucie Choi via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 15 09:04:11 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.")
----------------
luciechoi wrote:

Updated, thanks for the explanation!

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


More information about the cfe-commits mailing list