[PATCH] D125392: [riscv] Canonicalize vsetvli (vsetvli avl, vtype1) vtype2 transitions
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 11 10:18:55 PDT 2022
reames added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp:1170
+ // WARNING: For correctness, it is essential the contents of VL
+ // and VTYPE stay the same after this instruction. This
+ // greatly limits the mutation we can legally do here.
----------------
frasercrmck wrote:
> I think I'm getting confused by the comment here - what's "this instruction"? The current MI or the previous VSETVLI?
The current one. Essentially, if we skip emitting the state change, the mutated state on the prior MI (which we know is compatible with all of its own uses since we didn't change VL), must match what this state change would have produced. That is, the VL/VTYPE state after the the vector op must be the same, even if that vector op doesn't care. (e.g. we can't reintroduce the scalar move bug)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125392/new/
https://reviews.llvm.org/D125392
More information about the llvm-commits
mailing list