[PATCH] D38734: [MachineCombiner] Fix initialisation of LastUpdate for incremental update.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 10 08:12:42 PDT 2017


fhahn added reviewers: Gerolf, efriedma, MatzeB.
fhahn added a comment.

LGTM, thanks for fixing that Paul! Unless there are any additional concerns, I can commit your change tomorrow.

Just to re-iterate, the test/CodeGen/AArch64/machine-combiner.mir was added because in the IR version of the test case, the bug would not be triggered, as the DAGCombiner would kick in before the MachineCombiner. We might want to convert the existing machine-combiner.ll test case to a MIR case, to make sure this test actually exercises the MachineCombiner.



================
Comment at: lib/CodeGen/MachineCombiner.cpp:417
   bool IncrementalUpdate = false;
   auto BlockIter = MBB->begin();
+  decltype(BlockIter) LastUpdate;
----------------
just out of curiosity, would `auto auto BlockIter = MBB->begin(), LastUpdate;` work?


https://reviews.llvm.org/D38734





More information about the llvm-commits mailing list