HomePhabricator

[PowerPC] Fold redundant load immediates of zero and delete if possible

Authored by kamaub on May 12 2020, 11:15 AM.

Description

[PowerPC] Fold redundant load immediates of zero and delete if possible

This patch folds redundant load immediates into a zero for instructions
which recognise this as the value zero and not the register. If the load
immediate is no longer in use it is then deleted.

This is already done in earlier passes but the ppc-mi-peephole allows for
a more general implementation.

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