HomePhabricator

[PowerPC] Fix for excessive ACC copies due to PHI nodes

Authored by bsaleil on Dec 3 2020, 7:49 AM.

Description

[PowerPC] Fix for excessive ACC copies due to PHI nodes

When using accumulators in loops, they are passed around in PHI nodes of unprimed
accumulators, causing the generation of additional prime/unprime instructions.
This patch detects these cases and changes these PHI nodes to primed accumulator
PHI nodes. We also add IR and MIR test cases for several PHI node cases.

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

Details