This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Extra MVE select(binop) patterns
ClosedPublic

Authored by dmgreen on Jul 18 2020, 3:57 AM.

Details

Summary

This is very similar to D83222, but handling a slightly different for of predicated operations. When starting with a pattern of the form select(p, BinOp(x, y), x), Instcombine will often transform this to BinOp(x, select(p, y, 0)), where 0 is the identity value of the binop (0 for adds/subs, 1 for muls, -1 for ands etc). This adds the patterns that transforms those back into predicated binary operations.

There is also a very minor adjustment to tablegen null_frag in here, to allow it to also be recognized as a PatLeaf node, so that it can be used in MVE_TwoOpPattern to easily exclude the cases where we do not need the alternate transform.

Diff Detail

Event Timeline

dmgreen created this revision.Jul 18 2020, 3:57 AM
dmgreen updated this revision to Diff 279586.Jul 21 2020, 11:10 AM

Cleaned up some of the MVE/NEONimmAllZerosV and friends. Now called ARMimmAllZerosV and made a little simpler where possible.

This revision is now accepted and ready to land.Jul 22 2020, 5:44 AM
This revision was automatically updated to reflect the committed changes.