Revert 89562. We're being sneakier than I was giving us credit for, and this
authorJim Grosbach <grosbach@apple.com>
Sat, 21 Nov 2009 23:34:09 +0000 (23:34 +0000)
committerJim Grosbach <grosbach@apple.com>
Sat, 21 Nov 2009 23:34:09 +0000 (23:34 +0000)
isn't necessary.

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

lib/Target/ARM/ARMBaseRegisterInfo.cpp
test/CodeGen/ARM/hello.ll
test/CodeGen/ARM/ifcvt5.ll
test/CodeGen/ARM/insn-sched1.ll
test/CodeGen/Thumb2/thumb2-ifcvt1.ll
test/CodeGen/Thumb2/thumb2-ifcvt2.ll

index df458689733af38e9bbb3f41413fd1af8f741dc5..19762ee5cfb00e067806be54c828e6fb3f6371aa 100644 (file)
@@ -222,7 +222,6 @@ BitVector ARMBaseRegisterInfo::getReservedRegs(const MachineFunction &MF) const
   BitVector Reserved(getNumRegs());
   Reserved.set(ARM::SP);
   Reserved.set(ARM::PC);
-  // FP is reserved on Darwin even if we're not using it in this function.
   if (STI.isTargetDarwin() || hasFP(MF))
     Reserved.set(FramePtr);
   // Some targets reserve R9.
@@ -240,7 +239,6 @@ bool ARMBaseRegisterInfo::isReservedReg(const MachineFunction &MF,
     return true;
   case ARM::R7:
   case ARM::R11:
-    // FP is reserved on Darwin even if we're not using it in this function.
     if (FramePtr == Reg && (STI.isTargetDarwin() || hasFP(MF)))
       return true;
     break;
@@ -494,8 +492,7 @@ static unsigned calculateMaxStackAlignment(const MachineFrameInfo *FFI) {
 ///
 bool ARMBaseRegisterInfo::hasFP(const MachineFunction &MF) const {
   const MachineFrameInfo *MFI = MF.getFrameInfo();
-  return ((STI.isTargetDarwin() && MFI->hasCalls()) ||
-          NoFramePointerElim ||
+  return (NoFramePointerElim ||
           needsStackRealignment(MF) ||
           MFI->hasVarSizedObjects() ||
           MFI->isFrameAddressTaken());
index 23935b96efd753010ea9c8a08c88ef635bcd1923..ccdc7bf4c1408e20a13dbb48f7a1ead427f603e7 100644 (file)
@@ -2,7 +2,7 @@
 ; RUN: llc < %s -mtriple=arm-linux-gnueabi | grep mov | count 1
 ; RUN: llc < %s -mtriple=arm-linux-gnu --disable-fp-elim | \
 ; RUN:   grep mov | count 3
-; RUN: llc < %s -mtriple=arm-apple-darwin | grep mov | count 3
+; RUN: llc < %s -mtriple=arm-apple-darwin | grep mov | count 2
 
 @str = internal constant [12 x i8] c"Hello World\00"
 
index f6084b8479505896525fdedc32cfe03be9b771a0..623f2cb1dfabf19353ff8d0d540483ccc72ce70d 100644 (file)
@@ -1,7 +1,5 @@
 ; RUN: llc < %s -mtriple=armv7-apple-darwin | FileCheck %s
 
-; XFAIL: *
-
 @x = external global i32*              ; <i32**> [#uses=1]
 
 define void @foo(i32 %a) {
index 717b89cccb5f5d87adaa8cb261392579ae9fca3a..59f0d538d47ccf5d45f9b26cb048b18b64bd0634 100644 (file)
@@ -1,6 +1,6 @@
 ; RUN: llc < %s -march=arm -mattr=+v6
 ; RUN: llc < %s -mtriple=arm-apple-darwin -mattr=+v6 |\
-; RUN:   grep mov | count 4
+; RUN:   grep mov | count 3
 
 define i32 @test(i32 %x) {
         %tmp = trunc i32 %x to i16              ; <i16> [#uses=1]
index 617d0b1882965458f09470c9f974a2b1e6e3d45d..71199abc572864e0fe4978cd66fe29c4c7ee6811 100644 (file)
@@ -1,5 +1,4 @@
 ; RUN: llc < %s -mtriple=thumbv7-apple-darwin | FileCheck %s
-; XFAIL: *
 
 define i32 @t1(i32 %a, i32 %b, i32 %c, i32 %d) {
 ; CHECK: t1:
index 5ff9bfd1de83e20b910139d04d75e24dc716be9f..d917ffe56bbcbbcf1b7abe78815737ffa1d0d66e 100644 (file)
@@ -1,5 +1,4 @@
 ; RUN: llc < %s -mtriple=thumbv7-apple-darwin | FileCheck %s
-; XFAIL: *
 
 define void @foo(i32 %X, i32 %Y) {
 entry: