[llvm] [SPIRV] Change how to detect OpenCL/Vulkan Env and update tests accordingly. (PR #129689)
Marcos Maronas via llvm-commits
llvm-commits at lists.llvm.org
Wed May 28 06:53:23 PDT 2025
================
@@ -767,10 +767,10 @@ Register SPIRVGlobalRegistry::buildGlobalVariable(
// TODO: maybe move to GenerateDecorations pass.
const SPIRVSubtarget &ST =
cast<SPIRVSubtarget>(MIRBuilder.getMF().getSubtarget());
- if (IsConst && ST.isOpenCLEnv())
+ if (IsConst && !ST.isShaderEnv())
----------------
maarquitos14 wrote:
I was able to change a few. For those, I resolved the conversations. The conversations that are still unresolved cause test failures if changed. The reason is that we don't introduce any heuristic yet in this PR to set environment to OpenCL. Therefore some tests that pass triple `spirv[32|64]-unknown-unknown` have environment unknown during the whole execution. We are planning a follow up PR with at least one heuristic to set environment to OpenCL. I think after that one we will be able to change a few more of these, or even all of them. Is that acceptable for you @Keenuts?
https://github.com/llvm/llvm-project/pull/129689
More information about the llvm-commits
mailing list