[llvm] [HLSL][SPIRV] Remove unecessary STI.isShader() check that avoid OpConstantNull (PR #205386)

Vyacheslav Levytskyy via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 2 01:29:33 PDT 2026


VyacheslavLevytskyy wrote:

> This mostly looks pretty good but I think there's a change we'll need in `SPIRVUtils.cpp` for `foldImm` to handle the `OpConstantNull` we can get there now.

Looks good of course, but code patterns will change, so the change should be accompanied by more extensive testing as @bogner pointed out. E.g., not only `foldImm` but `getImm()` is exposed and used in `SPIRVInstructionSelector`, and relies on `SPIRV::OpConstantI`. We'd need to check call sites and cover by tests to be sure that it doesn't cause more failures.


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


More information about the llvm-commits mailing list