diff options
| author | Jonas Paulsson <paulsson@linux.vnet.ibm.com> | 2019-09-16 14:49:36 +0000 |
|---|---|---|
| committer | Jonas Paulsson <paulsson@linux.vnet.ibm.com> | 2019-09-16 14:49:36 +0000 |
| commit | b7dadc3562d0488127727c924b8735e4780a2b69 (patch) | |
| tree | d5bafd837a23c1ba7437ce10bdddfabf85fdc106 /llvm/lib | |
| parent | 98cb8db836b155d0497f9d609a43510fd8eaf83d (diff) | |
| download | bcm5719-llvm-b7dadc3562d0488127727c924b8735e4780a2b69.tar.gz bcm5719-llvm-b7dadc3562d0488127727c924b8735e4780a2b69.zip | |
[SystemZ] Call erase() on the right MBB in SystemZTargetLowering::emitSelect()
Since MBB was split *before* MI, the MI(s) will reside in JoinMBB (MBB) at
the point of erasing them, so calling StartMBB->erase() is actually wrong,
although it is "working" by all appearances.
Review: Ulrich Weigand
llvm-svn: 371995
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/SystemZ/SystemZISelLowering.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp index ce1582157e9..f79f40cc6c3 100644 --- a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp +++ b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp @@ -6678,7 +6678,7 @@ SystemZTargetLowering::emitSelect(MachineInstr &MI, std::next(MachineBasicBlock::iterator(LastMI)), MBB->end()); createPHIsForSelects(MIItBegin, MIItEnd, StartMBB, FalseMBB, MBB); - StartMBB->erase(MIItBegin, MIItEnd); + MBB->erase(MIItBegin, MIItEnd); return JoinMBB; } |

