forked from OSchip/llvm-project
[X86] Erase dead LEA instruction after converting it to MOV in FixupLEAPass::processInstrForSlow3OpLEA.
This commit is contained in:
parent
72c68f1352
commit
3adc819b7a
|
@ -650,6 +650,9 @@ void FixupLEAPass::processInstrForSlow3OpLEA(MachineBasicBlock::iterator &I,
|
|||
.addReg(DestReg)
|
||||
.add(Index);
|
||||
LLVM_DEBUG(NewMI->dump(););
|
||||
|
||||
MBB.erase(I);
|
||||
I = NewMI;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -378,7 +378,6 @@ body: |
|
|||
; CHECK: liveins: $eax, $ebp, $ebx
|
||||
; CHECK: $ebx = MOV32rr $ebp
|
||||
; CHECK: $ebx = ADD32rr $ebx, $ebp, implicit-def $eflags
|
||||
; CHECK: $ebx = LEA32r killed $ebp, 1, $ebp, 0, $noreg
|
||||
; CHECK: RETQ $ebx
|
||||
$ebx = LEA32r killed $ebp, 1, $ebp, 0, $noreg
|
||||
RETQ $ebx
|
||||
|
|
|
@ -873,7 +873,6 @@ body: |
|
|||
; CHECK: liveins: $rax, $rbp, $rbx
|
||||
; CHECK: $rbx = MOV64rr $rbp
|
||||
; CHECK: $rbx = ADD64rr $rbx, $rbp, implicit-def $eflags
|
||||
; CHECK: $rbx = LEA64r killed $rbp, 1, $rbp, 0, $noreg
|
||||
; CHECK: RETQ $ebx
|
||||
$rbx = LEA64r killed $rbp, 1, $rbp, 0, $noreg
|
||||
RETQ $ebx
|
||||
|
|
Loading…
Reference in New Issue