[all-commits] [llvm/llvm-project] 0037a5: [PHIElimination] Fix the killed flag for LowerPHIN...

Zhang Kang via All-commits all-commits at lists.llvm.org
Thu Jul 30 01:19:32 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0037a5f894345eef5552d6620548cc8ad5900b41
      https://github.com/llvm/llvm-project/commit/0037a5f894345eef5552d6620548cc8ad5900b41
  Author: Kang Zhang <shkzhang at cn.ibm.com>
  Date:   2020-07-30 (Thu, 30 Jul 2020)

  Changed paths:
    M llvm/lib/CodeGen/PHIElimination.cpp
    A llvm/test/CodeGen/PowerPC/phi-eliminate.mir

  Log Message:
  -----------
  [PHIElimination] Fix the killed flag for LowerPHINode()

Summary:
In the phi-node-elimination pass, we set the killed flag incorrectly.
When we eliminate the PHI node, we replace the PHI with a copy for the
incoming value.

Before this patch, we will set incoming value as killed(PHICopy). And
we will remove the killed flag from last using incoming value(OldKill).
This is correct, only if the new PHICopy is after the OldKill.

Reviewed By: bjope

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




More information about the All-commits mailing list