[llvm] [RISCV] Convert AVLs with vlenb to VLMAX where possible (PR #97800)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 5 02:47:00 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) ||
----------------
lukel97 wrote:

Yeah, I think RISCVInsertVSETVLI relies on hasSEWOp to check if an instruction is a pseudo. 

https://github.com/llvm/llvm-project/pull/97800


More information about the llvm-commits mailing list