[all-commits] [llvm/llvm-project] f3e904: [VP] Add vector-predicated reduction intrinsics

Fraser Cormack via All-commits all-commits at lists.llvm.org
Tue Aug 17 10:06:23 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f3e9047249d05ff2fb79076dbfbbdad4a35fbc63
      https://github.com/llvm/llvm-project/commit/f3e9047249d05ff2fb79076dbfbbdad4a35fbc63
  Author: Fraser Cormack <fraser at codeplay.com>
  Date:   2021-08-17 (Tue, 17 Aug 2021)

  Changed paths:
    M llvm/docs/LangRef.rst
    M llvm/include/llvm/IR/IntrinsicInst.h
    M llvm/include/llvm/IR/Intrinsics.td
    M llvm/include/llvm/IR/VPIntrinsics.def
    M llvm/lib/CodeGen/ExpandVectorPredication.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
    M llvm/lib/IR/IntrinsicInst.cpp
    M llvm/test/CodeGen/Generic/expand-vp.ll
    M llvm/test/Verifier/vp-intrinsics.ll
    M llvm/unittests/IR/VPIntrinsicTest.cpp

  Log Message:
  -----------
  [VP] Add vector-predicated reduction intrinsics

This patch adds vector-predicated ("VP") reduction intrinsics corresponding to
each of the existing unpredicated `llvm.vector.reduce.*` versions. Unlike the
unpredicated reductions, all VP reductions have a start value. This start value
is returned when the no vector element is active.

Support for expansion on targets without native vector-predication support is
included.

This patch is based on the ["reduction
slice"](https://reviews.llvm.org/D57504#1732277) of the LLVM-VP reference patch
(https://reviews.llvm.org/D57504).

Reviewed By: craig.topper

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




More information about the All-commits mailing list