[VP][SelectionDAG] Add a target-configurable EVL operand type
authorFraser Cormack <fraser@codeplay.com>
Mon, 24 May 2021 14:24:54 +0000 (15:24 +0100)
committerFraser Cormack <fraser@codeplay.com>
Thu, 27 May 2021 14:27:36 +0000 (15:27 +0100)
commit5a80dc498818d7f22a04d06986e78d151fb6e103
tree30c61ad0ce23267224e4aaf8127a4dce095c8728
parent9091ecdae0290d8c425d48a2c86bbdd4876d6507
[VP][SelectionDAG] Add a target-configurable EVL operand type

This patch adds a way for the target to configure the type it uses for
the explicit vector length operands of VP SDNodes. The type must be a
legal integer type (there is still no target-independent legalization of
this operand) and must currently be at least as big as i32, the type
used by the IR intrinsics. An implicit zero-extension takes place on
targets which choose a larger type. All VP nodes should be created with
this type used for the EVL operand.

This allows 64-bit RISC-V to avoid custom legalization of all VP nodes,
keeping them in their target-independent form for that bit longer.

Reviewed By: simoll

Differential Revision: https://reviews.llvm.org/D103027
llvm/include/llvm/CodeGen/TargetLowering.h
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.h