[llvm] [RISCV] Convert AVLs with vlenb to VLMAX where possible (PR #97800)
Pengcheng Wang via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 5 03:21:43 PDT 2024
================
@@ -62,6 +69,54 @@ char RISCVFoldMasks::ID = 0;
INITIALIZE_PASS(RISCVFoldMasks, DEBUG_TYPE, "RISC-V Fold Masks", false, false)
+// If an AVL is a VLENB that's possibly scaled to be equal to VLMAX, convert it
+// to the VLMAX sentinel value.
+bool RISCVFoldMasks::convertToVLMAX(MachineInstr &MI) const {
+ if (!RISCVII::hasVLOp(MI.getDesc().TSFlags) ||
----------------
wangpc-pp wrote:
Looking up table may be slow, I think it's OK to just check VL/SEW.
https://github.com/llvm/llvm-project/pull/97800
More information about the llvm-commits
mailing list