Fix a bug that caused the pass to go into infinite loops on trivial testcases.

This is fallout of the Bug 122 changes.

llvm-svn: 15811
diff --git a/llvm/lib/Analysis/IPA/Andersens.cpp b/llvm/lib/Analysis/IPA/Andersens.cpp
index 12f0fc3..54dfd74 100644
--- a/llvm/lib/Analysis/IPA/Andersens.cpp
+++ b/llvm/lib/Analysis/IPA/Andersens.cpp
@@ -251,7 +251,8 @@
     ///
     Node *getNode(Value *V) {
       if (Constant *C = dyn_cast<Constant>(V))
-        return getNodeForConstantPointer(C);
+        if (!isa<GlobalValue>(C))
+          return getNodeForConstantPointer(C);
 
       std::map<Value*, unsigned>::iterator I = ValueNodes.find(V);
       if (I == ValueNodes.end()) {