1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00

Clear preference when it no longer makes sense.

llvm-svn: 56019
This commit is contained in:
Evan Cheng 2008-09-09 21:44:23 +00:00
parent ed0ea8049f
commit f3a3ee6d01

View File

@ -1317,6 +1317,14 @@ bool SimpleRegisterCoalescing::JoinCopy(CopyRec &TheCopy, bool &Again) {
}
}
// If resulting interval has a preference that no longer fits because of subreg
// coalescing, just clear the preference.
if (ResDstInt->preference && (isExtSubReg || isInsSubReg)) {
const TargetRegisterClass *RC = mri_->getRegClass(ResDstInt->reg);
if (!RC->contains(ResDstInt->preference))
ResDstInt->preference = 0;
}
DOUT << "\n\t\tJoined. Result = "; ResDstInt->print(DOUT, tri_);
DOUT << "\n";