mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-05 14:34:55 +00:00
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:
parent
3188cab989
commit
c3c92d834a
@ -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…
x
Reference in New Issue
Block a user