mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-26 05:25:47 +00:00
Fix PR2783 - coalescer bug. Missing a TargetRegisterInfo::isVirtualRegister check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56112 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1319,7 +1319,8 @@ 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)) {
|
||||
if (ResDstInt->preference && (isExtSubReg || isInsSubReg) &&
|
||||
TargetRegisterInfo::isVirtualRegister(ResDstInt->reg)) {
|
||||
const TargetRegisterClass *RC = mri_->getRegClass(ResDstInt->reg);
|
||||
if (!RC->contains(ResDstInt->preference))
|
||||
ResDstInt->preference = 0;
|
||||
|
Reference in New Issue
Block a user