After r308422 we defer optimizations that can destroy loop canonical forms to
LateSimplifyCFG. Running LateSimplifyCFG after expanding atomic operations
can exploit more control-flow opportunities.
Details
Diff Detail
Event Timeline
test/CodeGen/AArch64/cmpxchg-idioms.ll | ||
---|---|---|
121 | This testcase looks weird because the loop isn't rotated like it normally would be... might not be guess it's not a big deal. Please add a short explanation of which CHECK lines are important and why; I assume we're threading a branch somewhere, but it isn't obvious exactly which branch. |
Added a comment in the test case to explain that the preheader is simplified during latesimplifycfg.
test/CodeGen/AArch64/cmpxchg-idioms.ll | ||
---|---|---|
121 | The loop wasn't rotated to show the missing simplifyCFG opportunity. This opportunity will be lost when loop is rotated. The preheader block gets simplified after this change and we can elide a branch. Added more CHECK lines and a comment to make it clear. |
This testcase looks weird because the loop isn't rotated like it normally would be... might not be guess it's not a big deal.
Please add a short explanation of which CHECK lines are important and why; I assume we're threading a branch somewhere, but it isn't obvious exactly which branch.