[all-commits] [llvm/llvm-project] f8abec: [ARM] Extra MVE select(binop) patterns

David Green via All-commits all-commits at lists.llvm.org
Wed Jul 22 06:08:56 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f8abecf3379de841c436f353f060929722af8602
      https://github.com/llvm/llvm-project/commit/f8abecf3379de841c436f353f060929722af8602
  Author: David Green <david.green at arm.com>
  Date:   2020-07-22 (Wed, 22 Jul 2020)

  Changed paths:
    M llvm/lib/Target/ARM/ARMInstrInfo.td
    M llvm/lib/Target/ARM/ARMInstrMVE.td
    M llvm/lib/Target/ARM/ARMInstrNEON.td
    M llvm/test/CodeGen/Thumb2/mve-pred-selectop3.ll
    M llvm/test/CodeGen/Thumb2/mve-vecreduce-addpred.ll
    M llvm/test/CodeGen/Thumb2/mve-vecreduce-mlapred.ll
    M llvm/utils/TableGen/CodeGenDAGPatterns.cpp

  Log Message:
  -----------
  [ARM] Extra MVE select(binop) patterns

This is very similar to 243970d03cace2, but handling a slightly
different form 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.

Differential Revision: https://reviews.llvm.org/D84091




More information about the All-commits mailing list