[PowerPC] eliminate partially redundant compare instruction
This patch extends this optimization to support partially redundant cases, which often happen in while loops.
For example, one compare instruction is moved from the loop body into the preheader by this optimization in the following example.
if (a == 0) dummy1(); a = func(a);
} while (a > 0);
Differential Revision: https://reviews.llvm.org/D38236