[VP][RISCV] Add vp.ctlz/cttz and RISC-V support.
authorYeting Kuo <yeting.kuo@sifive.com>
Tue, 20 Dec 2022 05:24:01 +0000 (13:24 +0800)
committerYeting Kuo <yeting.kuo@sifive.com>
Wed, 4 Jan 2023 07:15:01 +0000 (15:15 +0800)
commit1e9e1b9cf857415528bbc7ec9eefaf98bb080c8c
tree7f06e1a876abbef493c893a935d3541646c4d577
parent63d46869ea5769693f7895be066f042929512e06
[VP][RISCV] Add vp.ctlz/cttz and RISC-V support.

The patch also adds expandVPCTLZ and expandVPCTTZ to expand vp.ctlz/cttz nodes
and the cost model of vp.ctlz/cttz.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D140370
16 files changed:
llvm/docs/LangRef.rst
llvm/include/llvm/CodeGen/TargetLowering.h
llvm/include/llvm/IR/Intrinsics.td
llvm/include/llvm/IR/VPIntrinsics.def
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
llvm/test/Analysis/CostModel/RISCV/int-bit-manip.ll
llvm/test/CodeGen/RISCV/rvv/ctlz-vp.ll [new file with mode: 0644]
llvm/test/CodeGen/RISCV/rvv/cttz-vp.ll [new file with mode: 0644]
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-ctlz-vp.ll [new file with mode: 0644]
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-cttz-vp.ll [new file with mode: 0644]
llvm/unittests/IR/VPIntrinsicTest.cpp