[PowerPC] Check isPhysical() before converting Register to MCRegister. NFC (#173531)
This commit is contained in:
parent
8518d2c405
commit
f4bd619e85
@ -3832,9 +3832,9 @@ bool PPCInstrInfo::convertToImmediateForm(MachineInstr &MI,
|
||||
return true;
|
||||
|
||||
ImmInstrInfo III;
|
||||
bool IsVFReg = MI.getOperand(0).isReg()
|
||||
? PPC::isVFRegister(MI.getOperand(0).getReg())
|
||||
: false;
|
||||
bool IsVFReg = MI.getOperand(0).isReg() &&
|
||||
MI.getOperand(0).getReg().isPhysical() &&
|
||||
PPC::isVFRegister(MI.getOperand(0).getReg());
|
||||
bool HasImmForm = instrHasImmForm(MI.getOpcode(), IsVFReg, III, PostRA);
|
||||
// If this is a reg+reg instruction that has a reg+imm form,
|
||||
// and one of the operands is produced by an add-immediate,
|
||||
@ -4873,9 +4873,9 @@ bool PPCInstrInfo::transformToNewImmFormFedByAdd(
|
||||
|
||||
// get Imm Form info.
|
||||
ImmInstrInfo III;
|
||||
bool IsVFReg = MI.getOperand(0).isReg()
|
||||
? PPC::isVFRegister(MI.getOperand(0).getReg())
|
||||
: false;
|
||||
bool IsVFReg = MI.getOperand(0).isReg() &&
|
||||
MI.getOperand(0).getReg().isPhysical() &&
|
||||
PPC::isVFRegister(MI.getOperand(0).getReg());
|
||||
|
||||
if (!instrHasImmForm(XFormOpcode, IsVFReg, III, PostRA))
|
||||
return false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user