[llvm-commits] [llvm] r108441 - in /llvm/trunk: lib/CodeGen/SelectionDAG/TargetLowering.cpp test/CodeGen/X86/2010-07-15-Crash.ll
Devang Patel
dpatel at apple.com
Thu Jul 15 11:45:27 PDT 2010
Author: dpatel
Date: Thu Jul 15 13:45:27 2010
New Revision: 108441
URL: http://llvm.org/viewvc/llvm-project?rev=108441&view=rev
Log:
Fix crash reported in PR7653.
Added:
llvm/trunk/test/CodeGen/X86/2010-07-15-Crash.ll
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=108441&r1=108440&r2=108441&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Thu Jul 15 13:45:27 2010
@@ -2476,7 +2476,7 @@
int64_t Offs = GA->getOffset();
if (C) Offs += C->getZExtValue();
Ops.push_back(DAG.getTargetGlobalAddress(GA->getGlobal(),
- C->getDebugLoc(),
+ C ? C->getDebugLoc() : DebugLoc(),
Op.getValueType(), Offs));
return;
}
Added: llvm/trunk/test/CodeGen/X86/2010-07-15-Crash.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2010-07-15-Crash.ll?rev=108441&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2010-07-15-Crash.ll (added)
+++ llvm/trunk/test/CodeGen/X86/2010-07-15-Crash.ll Thu Jul 15 13:45:27 2010
@@ -0,0 +1,12 @@
+; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %s -o /dev/null
+; PR7653
+
+ at __FUNCTION__.1623 = external constant [4 x i8] ; <[4 x i8]*> [#uses=1]
+
+define void @foo() nounwind {
+entry:
+ tail call void asm sideeffect "", "s,i,~{fpsr},~{flags}"(i8* getelementptr
+inbounds ([4 x i8]* @__FUNCTION__.1623, i64 0, i64 0), i8* getelementptr
+inbounds ([4 x i8]* @__FUNCTION__.1623, i64 0, i64 0)) nounwind
+ ret void
+}
More information about the llvm-commits
mailing list