diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-09-09 20:22:01 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-09-09 20:22:01 +0000 |
commit | 53b728c27c76f3b97139ebfd8dc8d219c275b4fc (patch) | |
tree | 715c33c8b6be7f2f79421ba9b8bf7f18d9dbbe2d /llvm/lib/CodeGen | |
parent | 1a1140429ee5ca58d9a25aea570940826e478125 (diff) | |
download | bcm5719-llvm-53b728c27c76f3b97139ebfd8dc8d219c275b4fc.tar.gz bcm5719-llvm-53b728c27c76f3b97139ebfd8dc8d219c275b4fc.zip |
Fix PR2757. Ignore liveinterval register allocation preference if the preference register is not in the right register class. This can happen due to sub-register coalescing.
llvm-svn: 56006
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/RegAllocLinearScan.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/RegAllocLinearScan.cpp b/llvm/lib/CodeGen/RegAllocLinearScan.cpp index 91dda771475..2cfa755d169 100644 --- a/llvm/lib/CodeGen/RegAllocLinearScan.cpp +++ b/llvm/lib/CodeGen/RegAllocLinearScan.cpp @@ -1036,7 +1036,7 @@ unsigned RALinScan::getFreePhysReg(LiveInterval *cur) { // If copy coalescer has assigned a "preferred" register, check if it's // available first. if (cur->preference) { - if (prt_->isRegAvail(cur->preference)) { + if (prt_->isRegAvail(cur->preference) && RC->contains(cur->preference)) { DOUT << "\t\tassigned the preferred register: " << tri_->getName(cur->preference) << "\n"; return cur->preference; |