[llvm] [SPIR-V] Fix environment resolution causing legalization crash (PR #179052)
Dmitry Sidorov via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 2 02:58:02 PST 2026
================
@@ -173,6 +173,25 @@ void SPIRVSubtarget::initAvailableExtInstSets() {
accountForAMDShaderTrinaryMinmax();
}
+void SPIRVSubtarget::resolveEnvFromModule(const Module &M) {
+ if (Env != Unknown)
+ return;
+
+ bool HasShaderAttr = false;
+ for (const Function &F : M) {
+ if (F.getFnAttribute("hlsl.shader").isValid()) {
----------------
MrSidims wrote:
We may discuss it on the next backend WG meeting (if it wasn't discussed in the past already). FYI @michalpaszkowski
https://github.com/llvm/llvm-project/pull/179052
More information about the llvm-commits
mailing list