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:
parent
90795f0825
commit
7236678c32
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user