From 735705bc3e26ab23286db0ab00c9ba0e3fd5d734 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 27 Jun 2008 03:18:41 +0000 Subject: [PATCH] simplify this check, GetConstantStringInfo validates that a global is constant already. No functionality change. llvm-svn: 52812 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 9c5997df45d2..65d2d6ba3800 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -2594,11 +2594,9 @@ static bool isMemSrcFromString(SDOperand Src, std::string &Str, return false; GlobalVariable *GV = dyn_cast(G->getGlobal()); - if (GV && GV->isConstant()) { - if (GetConstantStringInfo(GV, Str)) { - SrcOff += SrcDelta; - return true; - } + if (GV && GetConstantStringInfo(GV, Str)) { + SrcOff += SrcDelta; + return true; } return false;