summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2010-09-02 17:12:55 +0000
committerJim Grosbach <grosbach@apple.com>2010-09-02 17:12:55 +0000
commit944aece38a5c9b411570f2b3c69658a0691d9525 (patch)
treeab180ea50a21dbebb0f792c124dcc89136d2a866 /llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp
parentda3ef85460d62f99192cee75b8092d016d6b619c (diff)
downloadbcm5719-llvm-944aece38a5c9b411570f2b3c69658a0691d9525.tar.gz
bcm5719-llvm-944aece38a5c9b411570f2b3c69658a0691d9525.zip
Anti-dependency breaking needs to be careful not to use reserved regs
llvm-svn: 112832
Diffstat (limited to 'llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp')
-rw-r--r--llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp b/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp
index 62e40e9636b..5a634d6ccb0 100644
--- a/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp
+++ b/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp
@@ -654,6 +654,8 @@ bool AggressiveAntiDepBreaker::FindSuitableFreeRegisters(
if (R == RB) R = RE;
--R;
const unsigned NewSuperReg = *R;
+ // Don't consider non-allocatable registers
+ if (!AllocatableSet.test(NewSuperReg)) continue;
// Don't replace a register with itself.
if (NewSuperReg == SuperReg) continue;
OpenPOWER on IntegriCloud