Fix for PR1023 by Dan Gohman.
authorEvan Cheng <evan.cheng@apple.com>
Wed, 29 Nov 2006 01:58:12 +0000 (01:58 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Wed, 29 Nov 2006 01:58:12 +0000 (01:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32003 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

index 3a4e457161e676b196b99026e7a7231851de94ad..570cac8e26136ea29c50e01af9e86c15456ef879 100644 (file)
@@ -3376,7 +3376,7 @@ void SelectionDAGLowering::visitMemIntrinsic(CallInst &I, unsigned Op) {
         }
         if (G) {
           GlobalVariable *GV = dyn_cast<GlobalVariable>(G->getGlobal());
-          if (GV) {
+          if (GV && GV->isConstant()) {
             Str = GV->getStringValue(false);
             if (!Str.empty()) {
               CopyFromStr = true;