[llvm-branch-commits] [llvm] [SPIRV] Do not eliminate `OpPointerType` even if unused (PR #182551)

Marcos Maronas via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Feb 24 05:47:26 PST 2026


maarquitos14 wrote:

I need to understand a little bit better the context. Let me ask a few questions:

> If the register type and instruction result type do not match,
> validatePtrTypes will insert bitcasts and fix the situation.
> 
> However, when no instruction references the type in the dictionary,
> we may remove it. Even if it is needed later.

The removal is happening before `validatePtrTypes`? If `validatePtrTypes` ran first, would this still be a problem? Is that something that we could do? If not, why? 

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


More information about the llvm-branch-commits mailing list