1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

Expand the scope to include global values because they are now constants

too.

llvm-svn: 14964
This commit is contained in:
Reid Spencer 2004-07-18 08:32:10 +00:00
parent 90795f0825
commit 7236678c32

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