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
This commit is contained in:
Reid Spencer 2004-07-18 08:32:10 +00:00
parent 3188cab989
commit c3c92d834a

View File

@ -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)) {