[all-commits] [llvm/llvm-project] d42678: [RISCV] Add side-effect-free vsetvli intrinsics
Fraser Cormack via All-commits
all-commits at lists.llvm.org
Mon Jan 24 06:02:40 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d42678b453bc2587a42eef1ba4e5782b2c8c5ff1
https://github.com/llvm/llvm-project/commit/d42678b453bc2587a42eef1ba4e5782b2c8c5ff1
Author: Fraser Cormack <fraser at codeplay.com>
Date: 2022-01-24 (Mon, 24 Jan 2022)
Changed paths:
M llvm/include/llvm/IR/IntrinsicsRISCV.td
M llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
M llvm/lib/Target/RISCV/RISCVISelDAGToDAG.h
M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
M llvm/test/CodeGen/RISCV/rvv/rv32-vsetvli-intrinsics.ll
M llvm/test/CodeGen/RISCV/rvv/rv64-vsetvli-intrinsics.ll
Log Message:
-----------
[RISCV] Add side-effect-free vsetvli intrinsics
This patch introduces new intrinsics that enable the use of vsetvli in
contexts where only the returned vector length is of interest. The
pre-existing intrinsics are marked with side-effects, which prevents
even trivial optimizations on/across them.
These intrinsics are intended to be used in situations where the vector
length is fed in turn to RVV intrinsics or to vector-predication
intrinsics during loop vectorization, for example. Those codegen paths
ensure that instructions are generated with their own implicit vsetvli,
so the vector length and vtype can be relied upon to be correct.
No corresponding C builtins are planned at this stage, though that is a
possibility for the future if the need arises.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D117910
More information about the All-commits
mailing list