[llvm] [NFC][SPIRV] Add AMDGCN SPIR-V specific defaults to the BE (PR #165815)

Juan Manuel Martinez CaamaƱo via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 31 03:23:34 PDT 2025


================

----------------
jmmartinez wrote:

```cpp
case Triple::SPIRVSubArch_v14:
  SPIRVVersion = VersionTuple(1, 4);
  break;
case Triple::SPIRVSubArch_v15:
  SPIRVVersion = VersionTuple(1, 5);
  break;
case Triple::SPIRVSubArch_v16:
  SPIRVVersion = VersionTuple(1, 6);
  break;
default:
    if (TT.getVendor() == Triple::AMD)
      SPIRVVersion = VersionTuple(1, 6);
    else
      SPIRVVersion = VersionTuple(1, 4);
}
```

This doesn't look right (but it's because the switch just puts the default mixed with the case for 1.4.

If v1.4 was explicitly specified we should still assign Version 1.4. We should move the default away.


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


More information about the llvm-commits mailing list