[all-commits] [llvm/llvm-project] 96591a: [GVN] Add tests showing generation of already exis...

Dmitry Makogon via All-commits all-commits at lists.llvm.org
Fri Oct 29 03:21:05 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 96591a14cd25bc30519c293efa8e01b4c7e869f6
      https://github.com/llvm/llvm-project/commit/96591a14cd25bc30519c293efa8e01b4c7e869f6
  Author: Dmitry Makogon <dmakogon at azul.com>
  Date:   2021-10-29 (Fri, 29 Oct 2021)

  Changed paths:
    A llvm/test/Transforms/GVN/gvn-eliminate-duplicating-phis.ll

  Log Message:
  -----------
  [GVN] Add tests showing generation of already existent PHIs for non-local loads

When we eliminate a non-local load in a loop, we create a new PHI for the loaded value,
while there already may be the exact same PHIs in the loop.

IndVarsSimplify currently can handle this case eliminating the duplicated PHIs.

However, if the loop PHI is of type of the load and also there exists
an use of the z(s)ext'ed of it, IndVarSimplify wouldn't eliminate the duplicating PHI.
It would just replace the IV with a widened one, leaving the GVN-generated PHI as is.




More information about the All-commits mailing list