Commit Graph

4 Commits

Author SHA1 Message Date
Kang Zhang d37befdfe5 [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
2020-07-19 07:01:45 +00:00
Kang Zhang 782a4dd1a4 [PowerPC] Use add instead of addReg in ppc-early-ret pass
Summary:
The ppc-early-ret pass use the addReg() to add operand to the new
instruction, it can't reserve the flag of old operand. This has caused
machine verfications failed.
This patch use add() to instead of addReg().

Reviewed By: steven.zhang

Differential Revision: https://reviews.llvm.org/D77997
2020-05-13 05:59:52 +00:00
Kang Zhang 9cd8db1c80 [NFC][PowerPC] Add 2 test cases to early-ret.mir to test BLR and BCCLR 2020-03-17 15:52:44 +00:00
Kang Zhang c4cbc58062 [NFC][PowerPC] Add a new MIR file te test ppc-early-ret pass 2020-03-12 03:18:56 +00:00