File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed
Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -1173,17 +1173,12 @@ bool AArch64RegisterInfo::getRegAllocationHints(
11731173 for (MCPhysReg R : Order) {
11741174 auto AddHintIfSuitable = [&](MCPhysReg R,
11751175 const MachineOperand &MO) -> bool {
1176- // R is a suitable register hint if:
1177- // * R is one of the source operands.
1178- // * The register allocator has not suggested any hints and one of the
1179- // instruction's source operands does not yet have a register
1180- // allocated for it.
1181- if (VRM->getPhys (MO.getReg ()) == R ||
1182- (!VRM->hasPhys (MO.getReg ()) && Hints.empty ())) {
1183- Hints.push_back (R);
1184- return true ;
1185- }
1186- return false ;
1176+ // R is a suitable register hint if R can reuse one of the other
1177+ // source operands.
1178+ if (VRM->getPhys (MO.getReg ()) != R)
1179+ return false ;
1180+ Hints.push_back (R);
1181+ return true ;
11871182 };
11881183
11891184 switch (InstFlags & AArch64::DestructiveInstTypeMask) {
You can’t perform that action at this time.
0 commit comments