aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/GCSE.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Scalar/GCSE.cpp')
-rw-r--r--lib/Transforms/Scalar/GCSE.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/GCSE.cpp b/lib/Transforms/Scalar/GCSE.cpp
index c24941320f..a3452a3f84 100644
--- a/lib/Transforms/Scalar/GCSE.cpp
+++ b/lib/Transforms/Scalar/GCSE.cpp
@@ -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)) {