[llvm-commits] [llvm] r52812 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Chris Lattner sabre at nondot.org
Thu Jun 26 20:18:41 PDT 2008


Author: lattner
Date: Thu Jun 26 22:18:41 2008
New Revision: 52812

URL: http://llvm.org/viewvc/llvm-project?rev=52812&view=rev
Log:
simplify this check, GetConstantStringInfo validates that a
global is constant already.  No functionality change.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=52812&r1=52811&r2=52812&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Thu Jun 26 22:18:41 2008
@@ -2594,11 +2594,9 @@
     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;





More information about the llvm-commits mailing list