[CodeGen] Make use of TargetRegisterInfo::findCommonRegClass. NFC. (#179981)

This commit is contained in:
Jay Foad 2026-02-05 17:22:46 +00:00 committed by GitHub
parent d31dbb9555
commit 77034cd325
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -94,15 +94,7 @@ static bool isCrossCopy(const MachineRegisterInfo &MRI,
}
}
unsigned PreA, PreB; // Unused.
if (SrcSubIdx && DstSubIdx)
return !TRI.getCommonSuperRegClass(SrcRC, SrcSubIdx, DstRC, DstSubIdx, PreA,
PreB);
if (SrcSubIdx)
return !TRI.getMatchingSuperRegClass(SrcRC, DstRC, SrcSubIdx);
if (DstSubIdx)
return !TRI.getMatchingSuperRegClass(DstRC, SrcRC, DstSubIdx);
return !TRI.getCommonSubClass(SrcRC, DstRC);
return !TRI.findCommonRegClass(SrcRC, SrcSubIdx, DstRC, DstSubIdx);
}
void DeadLaneDetector::addUsedLanesOnOperand(const MachineOperand &MO,