[all-commits] [llvm/llvm-project] 26b14c: [InferAddressSpaces] Fix assert on invalid bitcast...

Austin Kerbow via All-commits all-commits at lists.llvm.org
Thu Apr 7 20:12:49 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 26b14c3ea77fd66e4edc3d62231413621d793181
      https://github.com/llvm/llvm-project/commit/26b14c3ea77fd66e4edc3d62231413621d793181
  Author: Austin Kerbow <Austin.Kerbow at amd.com>
  Date:   2022-04-07 (Thu, 07 Apr 2022)

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

  Log Message:
  -----------
  [InferAddressSpaces] Fix assert on invalid bitcast placement

Similar to the problem in 0bb25b4603, 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.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D122964




More information about the All-commits mailing list