[all-commits] [llvm/llvm-project] 995b0f: [SPIRV] Handle `inttoptr` constant expressions in ...

Alex Voicu via All-commits all-commits at lists.llvm.org
Thu Nov 6 15:59:58 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 995b0f1883b2199432b419a388a95248d3baf9dc
      https://github.com/llvm/llvm-project/commit/995b0f1883b2199432b419a388a95248d3baf9dc
  Author: Alex Voicu <alexandru.voicu at amd.com>
  Date:   2025-11-07 (Fri, 07 Nov 2025)

  Changed paths:
    M llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
    M llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
    M llvm/test/CodeGen/SPIRV/ComparePointers.ll
    M llvm/test/CodeGen/SPIRV/complex-constexpr.ll
    A llvm/test/CodeGen/SPIRV/transcoding/ConvertPtrInGlobalInit.ll

  Log Message:
  -----------
  [SPIRV] Handle `inttoptr` constant expressions in global initialisers (#166494)

`inttoptr` usage in global initialisers is valid, and rather common when it comes to the machinery around vtables (construction vtables are particularly fond). This was not handled by the BE, even though SPIR-V allows forming `SpecConstantOp`s with the `OpConvertUToPtr` opcode, which is what these would map to. We augment instruction selection to address this.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list