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 | 6c2b627e2394f8642389ce08a494c1277074f6f6 (patch) | |
tree | e7e49845d636d9c0c64eefc18eb39bd5101ab54f /llvm/lib/Transforms | |
parent | 199aeb7f5998e44895891efefb4598b2641bf918 (diff) | |
download | bcm5719-llvm-6c2b627e2394f8642389ce08a494c1277074f6f6.tar.gz bcm5719-llvm-6c2b627e2394f8642389ce08a494c1277074f6f6.zip |
Expand the scope to include global values because they are now constants
too.
llvm-svn: 14964
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Scalar/GCSE.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/GCSE.cpp b/llvm/lib/Transforms/Scalar/GCSE.cpp index c24941320fc..a3452a3f847 100644 --- a/llvm/lib/Transforms/Scalar/GCSE.cpp +++ b/llvm/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)) { |