diff options
author | Luke Lau <luke@igalia.com> | 2024-07-11 14:22:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-11 14:22:00 +0800 |
commit | c74ba57e0bd910b2f890f596291f7da23931ed70 (patch) | |
tree | 8727cbac39ed8e337b7ac441c004e68692b9bcb5 /llvm/lib/CodeGen/MachineBasicBlock.cpp | |
parent | 7eae9bb856135136cddc4208a2b1546e9db44c9c (diff) | |
download | llvm-c74ba57e0bd910b2f890f596291f7da23931ed70.zip llvm-c74ba57e0bd910b2f890f596291f7da23931ed70.tar.gz llvm-c74ba57e0bd910b2f890f596291f7da23931ed70.tar.bz2 |
[RISCV] Convert AVLs with vlenb to VLMAX where possible (#97800)
Given an AVL that's computed from vlenb, if it's equal to VLMAX then we
can replace it with the VLMAX sentinel value.
The main motiviation is to be able to express an EVL of VLMAX in VP
intrinsics whilst emitting vsetvli a0, zero, so that we can replace
llvm.riscv.masked.strided.{load,store} with their VP counterparts.
This is done in RISCVVectorPeephole (previously RISCVFoldMasks, renamed
to account for the fact that it no longer just folds masks) instead of
SelectionDAG since there are multiple places places where VP nodes are
lowered that would have need to have been handled.
This also avoids doing it in RISCVInsertVSETVLI as it's much harder to
lookup the value of the AVL, and in RISCVVectorPeephole we can take
advantage of DeadMachineInstrElim to remove any leftover
PseudoReadVLENBs.
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
0 files changed, 0 insertions, 0 deletions