Fixes a bogus iterator resulting from the removal of a block's first instruction at the point that incremental update is enabled.
Patch by Paul Walker.
Differential D38734
[MachineCombiner] Fix initialisation of LastUpdate for incremental update. paulwalker-arm on Oct 10 2017, 7:52 AM. Authored by
Details Fixes a bogus iterator resulting from the removal of a block's first instruction at the point that incremental update is enabled. Patch by Paul Walker.
Diff Detail Event TimelineComment Actions 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 Actions Please take a look at http://llvm.org/docs/MIRLangRef.html#simplifying-mir-files and simplify the test.
|
just out of curiosity, would auto auto BlockIter = MBB->begin(), LastUpdate; work?