InferAddressSpaces: Fix assert on inferred source for inttoptr/ptrtoint
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 9 Feb 2022 00:22:00 +0000 (19:22 -0500)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 11 Feb 2022 15:35:29 +0000 (10:35 -0500)
commit52fbb786a638ecc7349641b45b62a5abafffdf75
tree8b6f6306253d1f1f5c5c6ffeb0caefdb91eb3fd0
parente9c0720010c07c75d63605610934e165b8aa4afd
InferAddressSpaces: Fix assert on inferred source for inttoptr/ptrtoint

If we had some source value we could infer an address space from that
went through a ptrtoint/inttoptr pair, this would fail since bitcast
can't change the address space.

Fixes issue 53665.
llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp
llvm/test/Transforms/InferAddressSpaces/AMDGPU/issue53665.ll [new file with mode: 0644]