[llvm] [SPIR-V] Enable structurizer for kernel environment (PR #166079)
Alex Voicu via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 3 11:56:37 PST 2025
================
@@ -181,7 +181,9 @@ void SPIRVPassConfig::addISelPrepare() {
// If an address space cast is not removed while targeting Vulkan, lowering
// will fail during MIR lowering.
addPass(createInferAddressSpacesPass());
+ }
+ if (TM.getSubtargetImpl()->isShader() || TM.getSubtargetImpl()->isKernel()) {
----------------
AlexVlx wrote:
Hmm, this does indeed cause issues, I think. We don't / cannot run passes over SPIR-V, asides from those that are absolutely necessary for successful lowering / obtaining valid SPIR-V (see #154765 for a bit more on this). We use `-disable-llvm-optzns`, but it'd not work here. Would it be at all possible to guard against enabling these for AMDGCNSPIRV? I.e. have the current check be replaced for a check on the vendor?
https://github.com/llvm/llvm-project/pull/166079
More information about the llvm-commits
mailing list