Fix undefined code and reenable test case.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 11 Jan 2012 09:08:04 +0000 (09:08 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 11 Jan 2012 09:08:04 +0000 (09:08 +0000)
I don't think the compact encoding code is right, but at least is has
defined behavior now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147938 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86FrameLowering.cpp
test/CodeGen/X86/2012-01-10-UndefExceptionEdge.ll

index 6a40cc1797419b2a132a4bfb6661c295035ca400..ac3ec89964e3978e3c1e12cfcfa9e5b905c8c7ec 100644 (file)
@@ -458,7 +458,7 @@ encodeCompactUnwindRegistersWithFrame(unsigned SavedRegs[CU_NUM_SAVED_REGS],
   // Encode the registers in the order they were saved, 3-bits per register. The
   // registers are numbered from 1 to 6.
   uint32_t RegEnc = 0;
-  for (int I = 0; I != 6; --I) {
+  for (int I = 0; I != 6; ++I) {
     unsigned Reg = SavedRegs[I];
     if (Reg == 0) break;
     int CURegNum = getCompactUnwindRegNum(CURegs, Reg);
@@ -470,7 +470,7 @@ encodeCompactUnwindRegistersWithFrame(unsigned SavedRegs[CU_NUM_SAVED_REGS],
     RegEnc |= (CURegNum & 0x7) << ((5 - I) * 3);
   }
 
-  assert((RegEnc & 0x7FFF) == RegEnc && "Invalid compact register encoding!");
+  assert((RegEnc & 0x3FFFF) == RegEnc && "Invalid compact register encoding!");
   return RegEnc;
 }
 
index 58db3aedb4b03b82735b083e532e970e3bba7ef4..832a8eb8144c6ab1c03a5b713db968e5aaaf0d20 100644 (file)
@@ -1,5 +1,4 @@
-; RUN: true
-; DONT: llc < %s -disable-fp-elim
+; RUN: llc < %s -disable-fp-elim
 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128-n8:16:32-S128"
 target triple = "i386-apple-macosx10.7"