diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-07-18 08:32:10 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-07-18 08:32:10 +0000 |
commit | c3c92d834a78b16910b4afef29697c0b83a89f26 (patch) | |
tree | ce3bd240a07f4c05a53099782149f3540f172238 | |
parent | 3188cab9898d30f14bf240a6f9a71754d25c2c4d (diff) | |
download | external_llvm-c3c92d834a78b16910b4afef29697c0b83a89f26.zip external_llvm-c3c92d834a78b16910b4afef29697c0b83a89f26.tar.gz external_llvm-c3c92d834a78b16910b4afef29697c0b83a89f26.tar.bz2 |
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
-rw-r--r-- | lib/Transforms/Scalar/GCSE.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/GCSE.cpp b/lib/Transforms/Scalar/GCSE.cpp index c249413..a3452a3 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)) { |