diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-03-31 23:02:15 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-03-31 23:02:15 +0000 |
commit | 07093426524c6598bc73c907e89a4190c84e5a3b (patch) | |
tree | 2cb45e4f09273ed984f17813014c978bdc1f0dd7 | |
parent | 903baeac27a287ce7b8c743fa43b1b9f6fc9fcd0 (diff) | |
download | bcm5719-llvm-07093426524c6598bc73c907e89a4190c84e5a3b.tar.gz bcm5719-llvm-07093426524c6598bc73c907e89a4190c84e5a3b.zip |
Provide a legal pointer register class when targeting thumb1.
The LocalStackSlotAllocation pass was creating illegal registers.
llvm-svn: 128687
-rw-r--r-- | llvm/lib/Target/ARM/Thumb1RegisterInfo.cpp | 5 | ||||
-rw-r--r-- | llvm/lib/Target/ARM/Thumb1RegisterInfo.h | 2 | ||||
-rw-r--r-- | llvm/test/CodeGen/Thumb/2009-08-20-ISelBug.ll | 2 |
3 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/Thumb1RegisterInfo.cpp b/llvm/lib/Target/ARM/Thumb1RegisterInfo.cpp index d1d7ec49e35..0cdca113c26 100644 --- a/llvm/lib/Target/ARM/Thumb1RegisterInfo.cpp +++ b/llvm/lib/Target/ARM/Thumb1RegisterInfo.cpp @@ -48,6 +48,11 @@ Thumb1RegisterInfo::Thumb1RegisterInfo(const ARMBaseInstrInfo &tii, : ARMBaseRegisterInfo(tii, sti) { } +const TargetRegisterClass * +Thumb1RegisterInfo::getPointerRegClass(unsigned Kind) const { + return ARM::tGPRRegisterClass; +} + /// emitLoadConstPool - Emits a load from constpool to materialize the /// specified immediate. void diff --git a/llvm/lib/Target/ARM/Thumb1RegisterInfo.h b/llvm/lib/Target/ARM/Thumb1RegisterInfo.h index 96412bd0cb1..b4fdd67b7fc 100644 --- a/llvm/lib/Target/ARM/Thumb1RegisterInfo.h +++ b/llvm/lib/Target/ARM/Thumb1RegisterInfo.h @@ -28,6 +28,8 @@ struct Thumb1RegisterInfo : public ARMBaseRegisterInfo { public: Thumb1RegisterInfo(const ARMBaseInstrInfo &tii, const ARMSubtarget &STI); + const TargetRegisterClass *getPointerRegClass(unsigned Kind = 0) const; + /// emitLoadConstPool - Emits a load from constpool to materialize the /// specified immediate. void emitLoadConstPool(MachineBasicBlock &MBB, diff --git a/llvm/test/CodeGen/Thumb/2009-08-20-ISelBug.ll b/llvm/test/CodeGen/Thumb/2009-08-20-ISelBug.ll index 39612c00e4f..d6ca0d79335 100644 --- a/llvm/test/CodeGen/Thumb/2009-08-20-ISelBug.ll +++ b/llvm/test/CodeGen/Thumb/2009-08-20-ISelBug.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -mtriple=thumbv6-apple-darwin -relocation-model=pic -disable-fp-elim -mattr=+v6 | FileCheck %s +; RUN: llc < %s -mtriple=thumbv6-apple-darwin -relocation-model=pic -disable-fp-elim -mattr=+v6 -verify-machineinstrs | FileCheck %s ; rdar://7157006 %struct.FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 } |