[llvm] r371995 - [SystemZ] Call erase() on the right MBB in SystemZTargetLowering::emitSelect()
Jonas Paulsson via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 16 07:49:36 PDT 2019
Author: jonpa
Date: Mon Sep 16 07:49:36 2019
New Revision: 371995
URL: http://llvm.org/viewvc/llvm-project?rev=371995&view=rev
Log:
[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
Modified:
llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp
Modified: llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp?rev=371995&r1=371994&r2=371995&view=diff
==============================================================================
--- llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp Mon Sep 16 07:49:36 2019
@@ -6678,7 +6678,7 @@ SystemZTargetLowering::emitSelect(Machin
std::next(MachineBasicBlock::iterator(LastMI)), MBB->end());
createPHIsForSelects(MIItBegin, MIItEnd, StartMBB, FalseMBB, MBB);
- StartMBB->erase(MIItBegin, MIItEnd);
+ MBB->erase(MIItBegin, MIItEnd);
return JoinMBB;
}
More information about the llvm-commits
mailing list