Index: lib/Transforms/Utils/BasicBlockUtils.cpp =================================================================== --- lib/Transforms/Utils/BasicBlockUtils.cpp +++ lib/Transforms/Utils/BasicBlockUtils.cpp @@ -164,11 +164,11 @@ std::vector Updates; if (DTU) { Updates.reserve(1 + (2 * succ_size(BB))); + for (auto I = succ_begin(BB), E = succ_end(BB); I != E; ++I) + Updates.push_back({DominatorTree::Insert, PredBB, *I}); Updates.push_back({DominatorTree::Delete, PredBB, BB}); - for (auto I = succ_begin(BB), E = succ_end(BB); I != E; ++I) { + for (auto I = succ_begin(BB), E = succ_end(BB); I != E; ++I) Updates.push_back({DominatorTree::Delete, BB, *I}); - Updates.push_back({DominatorTree::Insert, PredBB, *I}); - } } if (MSSAU)