[PowerPC] Look through copies for compare elimination
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Mon, 3 Jun 2019 19:09:15 +0000 (19:09 +0000)
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Mon, 3 Jun 2019 19:09:15 +0000 (19:09 +0000)
commitbad43d8f49cc3efc2751f11c795c0ad7b3fc3975
tree514da381fcb79cfa9b38f8004891f57b20894bb8
parent18ca8a2233a4be45944ce8d772f2930362641534
[PowerPC] Look through copies for compare elimination

We currently miss the opportunities for optmizing comparisons in the peephole
optimizer if the input is the result of a COPY since we look for record-form
versions of the producing instruction.

This patch simply lets the optimization peek through copies.

Differential revision: https://reviews.llvm.org/D59633

llvm-svn: 362438
llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
llvm/test/CodeGen/PowerPC/eliminate-compare-of-copy.ll [new file with mode: 0644]