[PATCH] D122964: [InferAddressSpaces] Fix assert on invalid bitcast placement

Austin Kerbow via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 1 23:13:52 PDT 2022


kerbowa created this revision.
kerbowa added reviewers: arsenm, foad.
Herald added subscribers: hiraditya, jvesely.
Herald added a project: All.
kerbowa requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

Similar to the problem in 0bb25b4603 <https://reviews.llvm.org/rG0bb25b46034aa6790b8b746bd0b8780219534664>, bitcasts that are inserted must
dominate all uses. When rewriting "values" with "new values" that have
the updated address space, we may replace the "new value" with a bitcast
if one of the original users is an addresspace cast. This bitcast must
be inserted before ALL users, not only before the addresspace cast.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D122964

Files:
  llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp
  llvm/test/Transforms/InferAddressSpaces/AMDGPU/insert-pos-assert.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122964.419940.patch
Type: text/x-patch
Size: 5040 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220402/7024ad8f/attachment.bin>


More information about the llvm-commits mailing list