This patch adds two IR intrinsics for vsetvli instruction. One to set the vector length to a user specified value and one to set it to vlmax. The vlmax uses the X0 source register encoding.
Clang builtins will follow in a separate patch
Paths
| Differential D92973
[RISCV] Add intrinsics for vsetvli instruction ClosedPublic Authored by craig.topper on Dec 9 2020, 2:35 PM.
Details Summary This patch adds two IR intrinsics for vsetvli instruction. One to set the vector length to a user specified value and one to set it to vlmax. The vlmax uses the X0 source register encoding. Clang builtins will follow in a separate patch
Diff Detail
Event TimelineHerald added subscribers: NickHung, apazos, sameer.abuasal and 21 others. · View Herald TranscriptDec 9 2020, 2:35 PM
Comment Actions The default should be ta and mu. The compiler is usually agnostic about the tail of the vector, but usually assumes that masked elements are preserved. This revision is now accepted and ready to land.Dec 16 2020, 11:56 PM Closed by commit rG69c8d121f7f2: [RISCV] Add intrinsics for vsetvli instruction (authored by craig.topper). · Explain WhyDec 18 2020, 12:57 PM This revision was automatically updated to reflect the committed changes. Comment Actions
Hello! Sorry to bother everyone, but I want to know what should one use to set ta/tu/ma/mu if the intrinsic just make ta and mu as default? Comment Actions
ta ma is now the default. The compiler will try to change it automatically based on the requirements of the intrinsics that use it. In some regards the intrinsic shouldn’t be thought of as creating a vsetvli instruction directly. It’s an intrinsic to get the VL that a vsetvli would produce for the given AVL, SEW, and LMUL.
Revision Contents
Diff 312876 llvm/include/llvm/IR/IntrinsicsRISCV.td
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.h
llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.cpp
llvm/test/CodeGen/RISCV/rvv/rv32-vsetvli-intrinsics.ll
llvm/test/CodeGen/RISCV/rvv/rv64-vsetvli-intrinsics.ll
|
typo? AVL?