[llvm] [NVPTX] Check Before inserting AddrSpaceCastInst in NVPTXLoweringAlloca (PR #106127)
Justin Fargnoli via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 26 14:07:47 PDT 2024
justinfargnoli wrote:
Interesting, I would've though that this is allowed. However, the IR Spec says otherwise ([source](https://llvm.org/docs/LangRef.html#id301)):
> The ‘addrspacecast’ instruction takes a pointer or vector of pointer value to cast and a pointer type to cast it to, which must have a different address space.
___
> would it be better to remove ☝️ instead?
Since the IR spec does not allow this, we should not remove the check.
https://github.com/llvm/llvm-project/pull/106127
More information about the llvm-commits
mailing list