[llvm] [SPIRV] Add support for CodeSectionINTEL storage class in legalizer (PR #167961)

Nick Sarnie via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 17 07:53:18 PST 2025


================
@@ -84,17 +84,19 @@ SPIRVLegalizerInfo::SPIRVLegalizerInfo(const SPIRVSubtarget &ST) {
   const LLT p6 = LLT::pointer(6, PSize); // SPV_INTEL_usm_storage_classes (Host)
   const LLT p7 = LLT::pointer(7, PSize); // Input
   const LLT p8 = LLT::pointer(8, PSize); // Output
+  const LLT p9 =
----------------
sarnex wrote:

We don't have an enum but we do have a mapping between the storage class operand and LLVM addrspace, if I were to use that here the code would look like

```
 const LLT p8 = LLT::pointer(storageClassToAddressSpace(SPIRV::StorageClass::Output), PSize);
```

I'm not sure that's much better but if you prefer this way I'm happy to implement it.

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


More information about the llvm-commits mailing list