[PATCH] D63402: InferAddressSpaces: Fix cloning original addrspacecast

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 17 04:30:29 PDT 2019


arsenm created this revision.
arsenm added reviewers: hliao, tra, yaxunl.
Herald added subscribers: jfb, nhaehnle, wdng, jvesely.

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.


https://reviews.llvm.org/D63402

Files:
  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
  test/Transforms/InferAddressSpaces/AMDGPU/select.ll
  test/Transforms/InferAddressSpaces/AMDGPU/volatile.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63402.205020.patch
Type: text/x-patch
Size: 15297 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190617/f5efba22/attachment-0001.bin>


More information about the llvm-commits mailing list