[PATCH] D119921: [RISCV] Teach VSETVLInsert to optimize vsetvli for ScalarMoveInstr
Chenbing.Zheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 16 01:19:09 PST 2022
Chenbing.Zheng added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp:1092
}
- if (NeedInsertVSETVLI)
+ if (ScalarMoveVSETVLI) {
+ if (NewInfo.hasAVLImm() &&
----------------
jacquesguan wrote:
> As the former comment, the scalar move instruction may share a VSETVLI with one or some other instructions, so in this situation, we could not only think about the scalar move instruction, other instructions may care about the LMUL.
Yer, if scalar move instruction share a VSETVLI with others, we do not optimize this case. Because as you said, that would cause the error. ScalarMoveVSETVLI will be nullptr in this case.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119921/new/
https://reviews.llvm.org/D119921
More information about the llvm-commits
mailing list