[all-commits] [llvm/llvm-project] 4b5630: [ARM] Turn vecreduce_add(add(x, y)) into vecreduce...

David Green via All-commits all-commits at lists.llvm.org
Fri Jul 30 02:11:02 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4b563067622d5fd58d5d91de8ce256a1bd36129a
      https://github.com/llvm/llvm-project/commit/4b563067622d5fd58d5d91de8ce256a1bd36129a
  Author: David Green <david.green at arm.com>
  Date:   2021-07-30 (Fri, 30 Jul 2021)

  Changed paths:
    M llvm/lib/Target/ARM/ARMISelLowering.cpp
    M llvm/test/CodeGen/Thumb2/mve-vaddv.ll
    M llvm/test/CodeGen/Thumb2/mve-vecreduce-mla.ll
    M llvm/test/CodeGen/Thumb2/mve-vecreduce-mlapred.ll
    M llvm/test/CodeGen/Thumb2/mve-vecreduce-slp.ll

  Log Message:
  -----------
  [ARM] Turn vecreduce_add(add(x, y)) into vecreduce(x) + vecreduce(y)

Under MVE we can use VADDV/VADDVA's to perform integer add reductions,
so it can be beneficial to use more reductions than summing subvectors
and reducing once. Especially for VMLAV/VMLAVA the mul can be
incorporated into the reduction, producing less instructions.

Some of the test cases currently get larger due to extra integer adds,
but will be improved in a followup patch.

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




More information about the All-commits mailing list