[all-commits] [llvm/llvm-project] a4729f: [RISCV] Lower RVV vector SELECTs to VSELECTs

Fraser Cormack via All-commits all-commits at lists.llvm.org
Thu Jun 24 02:21:46 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a4729f7f88097f9f1afb9a7294ee035888e7f687
      https://github.com/llvm/llvm-project/commit/a4729f7f88097f9f1afb9a7294ee035888e7f687
  Author: Fraser Cormack <fraser at codeplay.com>
  Date:   2021-06-24 (Thu, 24 Jun 2021)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-select-fp.ll
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-select-int.ll
    M llvm/test/CodeGen/RISCV/rvv/select-fp.ll
    M llvm/test/CodeGen/RISCV/rvv/select-int.ll

  Log Message:
  -----------
  [RISCV] Lower RVV vector SELECTs to VSELECTs

This patch optimizes the code generation of vector-type SELECTs (LLVM
select instructions with scalar conditions) by custom-lowering to
VSELECTs (LLVM select instructions with vector conditions) by splatting
the condition to a vector. This avoids the default expansion path which
would either introduce control flow or fully scalarize.

Reviewed By: craig.topper

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




More information about the All-commits mailing list