This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Allow TBB formation for Thumb1 in more cases.
Changes PlannedPublic

Authored by efriedma on Oct 19 2018, 1:55 PM.

Details

Summary

Requiring the input of the first shift to be killed is more conservative than necessary; we can just insert an explicit copy instead.

Thinking about it a bit more, I'm not sure it's really worth complicating this code to catch a few more cases; it's not uncommon (I found 7 instances in a relatively small codebase), but it's not really common either. That said, I have another patch that breaks a couple regression tests without this fix.

Diff Detail

Repository
rL LLVM

Event Timeline

efriedma created this revision.Oct 19 2018, 1:55 PM
dmgreen accepted this revision.Oct 22 2018, 2:48 AM

Yep, this came up a few times in the tests I ran. Looks like a nice improvement, and I don't think it complicate things too much.

test/CodeGen/Thumb/tbb-live-index.mir
9

Nit: Can you clean up the testcase a little.

This revision is now accepted and ready to land.Oct 22 2018, 2:48 AM
efriedma planned changes to this revision.Oct 26 2018, 12:23 PM

Looking over this again, I'm not doing quite what the comment says I'm doing. Specifically, the insertion point for the MOVS is wrong: it has to be inserted at the point of the shift, not the TBB, because Thumb1OrigIdx could be killed by some other instruction in the block.