[all-commits] [llvm/llvm-project] 6db0ce: [LegalizeVectorOps][RISCV] Add scalable-vector SEL...

Fraser Cormack via All-commits all-commits at lists.llvm.org
Mon May 10 00:30:36 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6db0cedd238590023398bb20dad94773b56c4c74
      https://github.com/llvm/llvm-project/commit/6db0cedd238590023398bb20dad94773b56c4c74
  Author: Fraser Cormack <fraser at codeplay.com>
  Date:   2021-05-10 (Mon, 10 May 2021)

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

  Log Message:
  -----------
  [LegalizeVectorOps][RISCV] Add scalable-vector SELECT expansion

This patch extends VectorLegalizer::ExpandSELECT to permit expansion
also for scalable vector types. The only real change is conditionally
checking for BUILD_VECTOR or SPLAT_VECTOR legality depending on the
vector type.

We can use this to fix "cannot select" errors for scalable vector
selects on the RISCV target. Note that in future patches RISCV will
possibly custom-lower vector SELECTs to VSELECTs for branchless codegen.

Reviewed By: craig.topper

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




More information about the All-commits mailing list