[llvm-commits] [llvm] r56019 - /llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
Evan Cheng
evan.cheng at apple.com
Tue Sep 9 14:44:23 PDT 2008
Author: evancheng
Date: Tue Sep 9 16:44:23 2008
New Revision: 56019
URL: http://llvm.org/viewvc/llvm-project?rev=56019&view=rev
Log:
Clear preference when it no longer makes sense.
Modified:
llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp?rev=56019&r1=56018&r2=56019&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp (original)
+++ llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp Tue Sep 9 16:44:23 2008
@@ -1317,6 +1317,14 @@
}
}
+ // 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";
More information about the llvm-commits
mailing list