aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-07-18 08:32:10 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-07-18 08:32:10 +0000
commitc3c92d834a78b16910b4afef29697c0b83a89f26 (patch)
treece3bd240a07f4c05a53099782149f3540f172238
parent3188cab9898d30f14bf240a6f9a71754d25c2c4d (diff)
downloadexternal_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.cpp2
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)) {