summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-06-27 03:18:41 +0000
committerChris Lattner <sabre@nondot.org>2008-06-27 03:18:41 +0000
commit735705bc3e26ab23286db0ab00c9ba0e3fd5d734 (patch)
treea8b87f73ae96c8b514aa9a5a22daa96c15ea040d
parent501c0b82d676434db2a0d080bc79bc7c711775e6 (diff)
downloadbcm5719-llvm-735705bc3e26ab23286db0ab00c9ba0e3fd5d734.tar.gz
bcm5719-llvm-735705bc3e26ab23286db0ab00c9ba0e3fd5d734.zip
simplify this check, GetConstantStringInfo validates that a
global is constant already. No functionality change. llvm-svn: 52812
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 9c5997df45d..65d2d6ba380 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<GlobalVariable>(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;
OpenPOWER on IntegriCloud