diff options
Diffstat (limited to 'llvm/lib/Target/X86/X86FixupLEAs.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86FixupLEAs.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86FixupLEAs.cpp b/llvm/lib/Target/X86/X86FixupLEAs.cpp index 543dc8b00fa05..9ac401bb02537 100644 --- a/llvm/lib/Target/X86/X86FixupLEAs.cpp +++ b/llvm/lib/Target/X86/X86FixupLEAs.cpp @@ -113,8 +113,8 @@ public: private: TargetSchedModel TSM; - const X86InstrInfo *TII; - const X86RegisterInfo *TRI; + const X86InstrInfo *TII = nullptr; + const X86RegisterInfo *TRI = nullptr; }; } @@ -650,6 +650,9 @@ void FixupLEAPass::processInstrForSlow3OpLEA(MachineBasicBlock::iterator &I, .addReg(DestReg) .add(Index); LLVM_DEBUG(NewMI->dump();); + + MBB.erase(I); + I = NewMI; return; } |