From: Reid Spencer Date: Sun, 18 Jul 2004 08:32:10 +0000 (+0000) Subject: Expand the scope to include global values because they are now constants X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=c3c92d834a78b16910b4afef29697c0b83a89f26;p=oota-llvm.git Expand the scope to include global values because they are now constants too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14964 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/GCSE.cpp b/lib/Transforms/Scalar/GCSE.cpp index c24941320fc..a3452a3f847 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(V) || isa(V)) { + if (!isa(V)) { I->replaceAllUsesWith(V); if (InvokeInst *II = dyn_cast(I)) {