OSDN Git Service

InferAddressSpaces: Fix cloning original addrspacecast
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 17 Jun 2019 14:13:29 +0000 (14:13 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 17 Jun 2019 14:13:29 +0000 (14:13 +0000)
commit6b4d361457bf9103e1f2423c34347b1a3cdd8675
tree6e8207033b91e2d2c856bdadb6eb2a0a29aa43a4
parent6f9792a23815e2f36b17263149dbe01484bb9d8e
InferAddressSpaces: Fix cloning original addrspacecast

If an addrspacecast needed to be inserted again, this was creating a
clone of the original cast for each user. Just use the original, which
also saves losing the value name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363562 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/InferAddressSpaces.cpp
test/Transforms/InferAddressSpaces/AMDGPU/icmp.ll
test/Transforms/InferAddressSpaces/AMDGPU/infer-addrspacecast.ll
test/Transforms/InferAddressSpaces/AMDGPU/intrinsics.ll
test/Transforms/InferAddressSpaces/AMDGPU/redundant-addrspacecast.ll [new file with mode: 0644]
test/Transforms/InferAddressSpaces/AMDGPU/select.ll
test/Transforms/InferAddressSpaces/AMDGPU/volatile.ll