Changes For Bug 352
[oota-llvm.git] / lib / Transforms / Scalar / GCSE.cpp
index c24941320fc89fc4ffedbe21e6c23d74b628857f..776ff6603aa4b1af6ec2374293f1411e5c8faad0 100644 (file)
@@ -22,8 +22,8 @@
 #include "llvm/Analysis/Dominators.h"
 #include "llvm/Analysis/ValueNumbering.h"
 #include "llvm/Transforms/Utils/Local.h"
-#include "Support/DepthFirstIterator.h"
-#include "Support/Statistic.h"
+#include "llvm/ADT/DepthFirstIterator.h"
+#include "llvm/ADT/Statistic.h"
 #include <algorithm>
 using namespace llvm;
 
@@ -185,7 +185,7 @@ void GCSE::ReplaceInstructionWith(Instruction *I, Value *V) {
 
   // If we are not replacing the instruction with a constant, we cannot do
   // anything special.
-  if (!isa<Constant>(V) || isa<GlobalValue>(V)) {
+  if (!isa<Constant>(V)) {
     I->replaceAllUsesWith(V);
 
     if (InvokeInst *II = dyn_cast<InvokeInst>(I)) {