HomePhabricator

[PowerPC][Peephole] Check if `extsw`'s second operand is a virtual register

Description

[PowerPC][Peephole] Check if extsw's second operand is a virtual register

Summary:
When combining extsw and sldi in PPCMIPeephole, we have to check
if extsw's second operand is a virtual register, otherwise we might
get miscompile.

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