[PATCH] D116307: [RISCV] Teach VSETVLInsert to eliminate redundant vsetvli for vmv.s.x and vfmv.s.f.
Jianjian Guan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 29 03:49:30 PST 2021
jacquesguan added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp:68
: AVLImm(0), TailAgnostic(false), MaskAgnostic(false), MaskRegOp(false),
StoreOp(false), SEWLMULRatioOnly(false) {}
----------------
craig.topper wrote:
> Do we need to init ScalarMovOp here?
Done.
================
Comment at: llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp:101
+ bool hasZeroAVL() const {
+ if (hasAVLImm()) {
+ return getAVLImm() == 0;
----------------
craig.topper wrote:
> Drop curly braces around single line if bodies
Done.
================
Comment at: llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp:106
+ }
+ bool hasPositiveAVL() const {
+ if (hasAVLImm()) {
----------------
craig.topper wrote:
> This is really `hasNonZeroAVL` rather than positive right?
Done.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116307/new/
https://reviews.llvm.org/D116307
More information about the llvm-commits
mailing list