This is an archive of the discontinued LLVM Phabricator instance.

[SVE] Relax merge requirement for IR based divides.
ClosedPublic

Authored by paulwalker-arm on Jun 29 2020, 9:15 AM.

Details

Summary

We currently lower SDIV to SDIV_MERGE_OP1. This forces the value
for inactive lanes in a way that can hamper register allocation,
however, the lowering has no requirement for inactive lanes.

Instead this patch replaces SDIV_MERGE_OP1 with SDIV_PRED thus
freeing the register allocator. Once done the only user of
SDIV_MERGE_OP1 is intrinsic lowering so I've removed the node
and perform ISel on the intrinsic directly. This also allows
us to implement MOVPRFX based zeroing in the same manner as SUB.

This patch also renames UDIV_MERGE_OP1 and [F]ADD_MERGE_OP1 for
the same reason but in the ADD cases the ISel code is already
as required.

Diff Detail

Event Timeline

paulwalker-arm created this revision.Jun 29 2020, 9:15 AM
Herald added a project: Restricted Project. · View Herald Transcript

In preparation for D82780 rather than compound the problem I've refactored this patch to use separate multiclasses to create the undef variants of pseudo instructions for adds and divides. By doing this I also no longer need to create zeroing forms for divides and have thus removed that code and matching tests.

This revision is now accepted and ready to land.Jun 30 2020, 11:10 AM
This revision was automatically updated to reflect the committed changes.