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

Alex Voicu via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 31 07:19:22 PDT 2025


https://github.com/AlexVlx commented:

> ```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.
>  

Fixed, I didn't pay enough attention.

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


More information about the llvm-commits mailing list