From: Evan Cheng Date: Wed, 29 Nov 2006 01:58:12 +0000 (+0000) Subject: Fix for PR1023 by Dan Gohman. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f3e486e069011c70abb771958dc1218912b98eea;p=oota-llvm.git Fix for PR1023 by Dan Gohman. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32003 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 3a4e457161e..570cac8e261 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -3376,7 +3376,7 @@ void SelectionDAGLowering::visitMemIntrinsic(CallInst &I, unsigned Op) { } if (G) { GlobalVariable *GV = dyn_cast(G->getGlobal()); - if (GV) { + if (GV && GV->isConstant()) { Str = GV->getStringValue(false); if (!Str.empty()) { CopyFromStr = true;