[llvm-commits] [llvm] r54004 - in /llvm/trunk: lib/Target/ARM/ARMISelLowering.cpp test/CodeGen/ARM/2008-07-24-CodeGenPrepCrash.ll
Evan Cheng
evan.cheng at apple.com
Thu Jul 24 17:55:17 PDT 2008
Author: evancheng
Date: Thu Jul 24 19:55:17 2008
New Revision: 54004
URL: http://llvm.org/viewvc/llvm-project?rev=54004&view=rev
Log:
Teach ARM isLegalAddressingMode to handle unknown type without crashing. This fixes pr2589.
Added:
llvm/trunk/test/CodeGen/ARM/2008-07-24-CodeGenPrepCrash.ll
Modified:
llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=54004&r1=54003&r2=54004&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Thu Jul 24 19:55:17 2008
@@ -1598,7 +1598,7 @@
/// by AM is legal for this target, for a load/store of the specified type.
bool ARMTargetLowering::isLegalAddressingMode(const AddrMode &AM,
const Type *Ty) const {
- if (!isLegalAddressImmediate(AM.BaseOffs, getValueType(Ty), Subtarget))
+ if (!isLegalAddressImmediate(AM.BaseOffs, getValueType(Ty, true), Subtarget))
return false;
// Can never fold addr of global into load/store.
Added: llvm/trunk/test/CodeGen/ARM/2008-07-24-CodeGenPrepCrash.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/2008-07-24-CodeGenPrepCrash.ll?rev=54004&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/2008-07-24-CodeGenPrepCrash.ll (added)
+++ llvm/trunk/test/CodeGen/ARM/2008-07-24-CodeGenPrepCrash.ll Thu Jul 24 19:55:17 2008
@@ -0,0 +1,9 @@
+; RUN: llvm-as < %s | llc -march=arm
+; PR2589
+
+define void @main({ i32 }*) {
+entry:
+ %sret1 = alloca { i32 } ; <{ i32 }*> [#uses=1]
+ load { i32 }* %sret1 ; <{ i32 }>:1 [#uses=0]
+ ret void
+}
More information about the llvm-commits
mailing list