[PATCH] D84091: [ARM] Extra MVE select(binop) patterns

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 18 03:57:32 PDT 2020


dmgreen created this revision.
dmgreen added reviewers: SjoerdMeijer, simon_tatham, samparker, efriedma, ostannard.
Herald added subscribers: danielkiss, hiraditya, kristof.beyls.
Herald added a project: LLVM.

This is very similar to D83222 <https://reviews.llvm.org/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.


https://reviews.llvm.org/D84091

Files:
  llvm/lib/Target/ARM/ARMInstrMVE.td
  llvm/test/CodeGen/Thumb2/mve-pred-selectop3.ll
  llvm/utils/TableGen/CodeGenDAGPatterns.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84091.278670.patch
Type: text/x-patch
Size: 33888 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200718/6789f5a3/attachment.bin>


More information about the llvm-commits mailing list