diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-09-11 18:40:32 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-09-11 18:40:32 +0000 |
commit | 4086906a0f813065244cc9f845e45527ae704b58 (patch) | |
tree | 2198b57de72a78858353a611d7988d85bf413f0b /lib/CodeGen | |
parent | ffeecd65e3766ed3ace4e81a8f190dbbd7758bea (diff) | |
download | llvm-4086906a0f813065244cc9f845e45527ae704b58.tar.gz llvm-4086906a0f813065244cc9f845e45527ae704b58.tar.bz2 llvm-4086906a0f813065244cc9f845e45527ae704b58.tar.xz |
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
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/SimpleRegisterCoalescing.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/SimpleRegisterCoalescing.cpp b/lib/CodeGen/SimpleRegisterCoalescing.cpp index c6d4576e9c..2d4d590715 100644 --- a/lib/CodeGen/SimpleRegisterCoalescing.cpp +++ b/lib/CodeGen/SimpleRegisterCoalescing.cpp @@ -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; |