[llvm] [ValueTracking] Allow tracking values through Integral AddrSpaceCasts (PR #70483)

Jeffrey Byrnes via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 11 10:35:31 PDT 2024


jrbyrnes wrote:

> I don't see the connection. NVPTX generic address space is just 0, which certainly is integral. I don't believe any of the nvptx address spaces are nonintegral

Sorry, I meant to flag the block with that check as the entry point.

Casting from the target specific address spaces to the generic requires use of a target specific instruction. For example, NVPTX::cvta_shared (lowers to cvta.shared instruction) is used to go from shared -> generic . I'm not sure the semantics of this instruction, but I would assume it is not semantically equivalent to truncated / extended bitcast. Based on this assumption, this optimization is not correct for this address space. But, it seems to me that this shared address space (as well as the others handled in the block) has a target dependent integral representation, and is thus non-integral. 



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


More information about the llvm-commits mailing list