[PowerPC] Fix getMemOperandWithOffsetWidth
Commit 3c0b3250 introduced memory cluster under pwr10 target, but a
check for operands was unexpectedly removed. This adds it back to avoid
regression.
This commit is contained in:
@@ -4765,7 +4765,7 @@ MachineInstr *PPCInstrInfo::findLoopInstr(
|
||||
bool PPCInstrInfo::getMemOperandWithOffsetWidth(
|
||||
const MachineInstr &LdSt, const MachineOperand *&BaseReg, int64_t &Offset,
|
||||
unsigned &Width, const TargetRegisterInfo *TRI) const {
|
||||
if (!LdSt.mayLoadOrStore())
|
||||
if (!LdSt.mayLoadOrStore() || LdSt.getNumExplicitOperands() != 3)
|
||||
return false;
|
||||
|
||||
// Handle only loads/stores with base register followed by immediate offset.
|
||||
|
||||
Reference in New Issue
Block a user