[all-commits] [llvm/llvm-project] 46aac9: [GVN] Remove users from ICF when RAUWing loads

Nikita Popov via All-commits all-commits at lists.llvm.org
Thu Oct 5 02:21:51 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 46aac949bcfef83d03bffd849955c84c6a8e7c31
      https://github.com/llvm/llvm-project/commit/46aac949bcfef83d03bffd849955c84c6a8e7c31
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-10-05 (Thu, 05 Oct 2023)

  Changed paths:
    M llvm/lib/Transforms/Scalar/GVN.cpp
    A llvm/test/Transforms/GVN/pr48805.ll

  Log Message:
  -----------
  [GVN] Remove users from ICF when RAUWing loads

When performing store to load forwarding, replacing users of the
load may turn an indirect call into one with a known callee, in
which case it might become willreturn, invalidating cached ICF
information. Avoid this by removing users.

This is a bit more aggressive than strictly necessary (e.g. this
shouldn't be necessary when doing load-load CSE), but better safe
than sorry.

Fixes https://github.com/llvm/llvm-project/issues/48805.




More information about the All-commits mailing list