[PowerPC] Remove the redundant implicit operands in ppc-early-ret pass
authorKang Zhang <shkzhang@cn.ibm.com>
Sun, 19 Jul 2020 07:01:45 +0000 (07:01 +0000)
committerKang Zhang <shkzhang@cn.ibm.com>
Sun, 19 Jul 2020 07:01:45 +0000 (07:01 +0000)
commitd37befdfe5cd93666f8077c32836673ad70385d1
treedd21dce5232339d37794b08072619262ac3d947f
parentaf4c8730924fb6617494c223dac62d6c72c97c6f
[PowerPC] Remove the redundant implicit operands in ppc-early-ret pass

Summary:
In the `ppc-early-ret` pass, we have use `BuildMI` and `copyImplicitOps` when the branch instructions can do the early return. But the two functions will add implicit operands twice, this is not correct.

This patch is to remove the redundant implicit operands in `ppc-early-ret pass`.

Reviewed By: jsji

Differential Revision: https://reviews.llvm.org/D76042
llvm/lib/Target/PowerPC/PPCEarlyReturn.cpp
llvm/test/CodeGen/PowerPC/early-ret-verify.mir
llvm/test/CodeGen/PowerPC/early-ret.mir