diff options
author | Jim Grosbach <grosbach@apple.com> | 2013-02-19 18:55:36 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2013-02-19 18:55:36 +0000 |
commit | 3fa275e6f76a5b7fc24c341a58aa10f8da987e92 (patch) | |
tree | 0b93923adefcb9e5cacd8ec867718ade3de1fecb /llvm/lib/Target/ARM | |
parent | 7e28db019a4ecba0a3f13e4c5d424b4a7d641e5c (diff) | |
download | bcm5719-llvm-3fa275e6f76a5b7fc24c341a58aa10f8da987e92.tar.gz bcm5719-llvm-3fa275e6f76a5b7fc24c341a58aa10f8da987e92.zip |
ARM: Allocation hints must make sure to be in the alloc order.
When creating an allocation hint for a register pair, make sure the hint
for the physical register reference is still in the allocation order.
rdar://13240556
llvm-svn: 175541
Diffstat (limited to 'llvm/lib/Target/ARM')
-rw-r--r-- | llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp b/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp index 0deafae7385..db33d540a4d 100644 --- a/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp +++ b/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp @@ -205,7 +205,8 @@ ARMBaseRegisterInfo::getRegAllocationHints(unsigned VirtReg, } // First prefer the paired physreg. - if (PairedPhys) + if (PairedPhys && + std::find(Order.begin(), Order.end(), PairedPhys) != Order.end()) Hints.push_back(PairedPhys); // Then prefer even or odd registers. |