Skip to content

Commit b7f305f

Browse files
committed
Address review comments
1 parent 3241156 commit b7f305f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,10 +1154,9 @@ bool AArch64RegisterInfo::getRegAllocationHints(
11541154

11551155
// For predicated SVE instructions where the inactive lanes are undef,
11561156
// pick a destination register that is not unique to avoid introducing
1157-
// a movprfx to copy a unique register to the destination operand.
1157+
// a movprfx.
11581158
const TargetRegisterClass *RegRC = MRI.getRegClass(VirtReg);
1159-
if (ST.isSVEorStreamingSVEAvailable() &&
1160-
AArch64::ZPRRegClass.hasSubClassEq(RegRC)) {
1159+
if (AArch64::ZPRRegClass.hasSubClassEq(RegRC)) {
11611160
for (const MachineOperand &DefOp : MRI.def_operands(VirtReg)) {
11621161
const MachineInstr &Def = *DefOp.getParent();
11631162
if (DefOp.isImplicit() ||
@@ -1167,6 +1166,9 @@ bool AArch64RegisterInfo::getRegAllocationHints(
11671166

11681167
for (MCPhysReg R : Order) {
11691168
auto AddHintIfSuitable = [&](MCPhysReg R, const MachineOperand &MO) {
1169+
// R is a suitable register hint if there exists an operand for the
1170+
// instruction that is not yet allocated a register or if R matches
1171+
// one of the other source operands.
11701172
if (!VRM->hasPhys(MO.getReg()) || VRM->getPhys(MO.getReg()) == R)
11711173
Hints.push_back(R);
11721174
};
@@ -1187,8 +1189,6 @@ bool AArch64RegisterInfo::getRegAllocationHints(
11871189
break;
11881190
case AArch64::DestructiveBinary:
11891191
case AArch64::DestructiveBinaryImm:
1190-
case AArch64::DestructiveUnaryPassthru:
1191-
case AArch64::Destructive2xRegImmUnpred:
11921192
AddHintIfSuitable(R, Def.getOperand(2));
11931193
break;
11941194
}

0 commit comments

Comments
 (0)