[PATCH] D106857: [RISCV] Teach VSETVLI insertion to merge the unused VSETVLI with the one need to be insert after it.
Jianjian Guan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 28 02:22:56 PDT 2021
jacquesguan added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp:695
+ (NewInfo.hasAVLReg() &&
+ NewInfo.getAVLReg() == VSETVLIMI->getOperand(0).getReg())))
+ VSETVLIMI->getOperand(2).setImm(NewInfo.encodeVTYPE());
----------------
craig.topper wrote:
> What if the original vsetvli had a smaller vlmax than the instruction we're inserting for. Won't we lose the clipping that should have existed?
Yes, so we can only merge vsetvli only if those two vsetvli have the same AVL and the same VLMAX or we can confirm that the first vsetvli's result won't be used.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106857/new/
https://reviews.llvm.org/D106857
More information about the llvm-commits
mailing list