From 944aece38a5c9b411570f2b3c69658a0691d9525 Mon Sep 17 00:00:00 2001 From: Jim Grosbach Date: Thu, 2 Sep 2010 17:12:55 +0000 Subject: Anti-dependency breaking needs to be careful not to use reserved regs llvm-svn: 112832 --- llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp') 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; -- cgit v1.2.3