This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Fix the operand used for WLS in ARMLowOverheadLoops
ClosedPublic

Authored by dmgreen on May 17 2021, 6:22 AM.

Details

Summary

The Loop start instruction handled by the ARMLowOverheadLoops are:
$lr = t2DoLoopStart $r0
$lr = t2DoLoopStartTP $r1, $r0
$lr = t2WhileLoopStartLR $r0, %bb, implicit-def dead $cpsr
All three of these will have LR as the 0 argument, the trip count as the 1 argument.

This patch updated a few places in ARMLowOverheadLoops where the 0th arg was being used for t2WhileLoopStartLR instructions as the trip count. One place was entirely removed as i does not seem valid any more, the case the code is trying to protect against should not be able to occur with our correct-by-construction low overhead loops.

Diff Detail

Event Timeline

dmgreen created this revision.May 17 2021, 6:22 AM
dmgreen requested review of this revision.May 17 2021, 6:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 17 2021, 6:22 AM
samtebbs accepted this revision.May 20 2021, 2:11 AM

Nice correction, LGTM

This revision is now accepted and ready to land.May 20 2021, 2:11 AM
This revision was automatically updated to reflect the committed changes.