[llvm] r279022 - TailDuplicator: Fix crash after r278974
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 17 17:59:33 PDT 2016
Author: matze
Date: Wed Aug 17 19:59:32 2016
New Revision: 279022
URL: http://llvm.org/viewvc/llvm-project?rev=279022&view=rev
Log:
TailDuplicator: Fix crash after r278974
Some inputs would after r278974 without this fix (see
http://lab.llvm.org:8080/green/job/clang-stage2-cmake-RgSan_build/2733/console
for an example)
Modified:
llvm/trunk/lib/CodeGen/TailDuplicator.cpp
Modified: llvm/trunk/lib/CodeGen/TailDuplicator.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TailDuplicator.cpp?rev=279022&r1=279021&r2=279022&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TailDuplicator.cpp (original)
+++ llvm/trunk/lib/CodeGen/TailDuplicator.cpp Wed Aug 17 19:59:32 2016
@@ -673,7 +673,7 @@ bool TailDuplicator::duplicateSimpleBB(
<< "From simple Succ: " << *TailBB);
MachineBasicBlock *NewTarget = *TailBB->succ_begin();
- MachineBasicBlock *NextBB = &*std::next(PredBB->getIterator());
+ MachineBasicBlock *NextBB = PredBB->getNextNode();
// Make PredFBB explicit.
if (PredCond.empty())
More information about the llvm-commits
mailing list