[llvm] [RISCV][VLOPT] Add support for mask-register logical instructions and set mask instructions (PR #112231)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 15 08:08:03 PDT 2024
================
@@ -475,6 +475,28 @@ static OperandInfo getOperandInfo(const MachineInstr &MI,
return OperandInfo(EMUL, Log2EEW);
}
+ // 15. Vector Mask Instructions
+ // 15.1. Vector Mask-Register Logical Instructions
+ // 15.4. vmsbf.m set-before-first mask bit
+ // 15.6. vmsof.m set-only-first mask bit
+ // EEW=1 and EMUL=(EEW/SEW)*LMUL
+ // We handle the cases when operand is a v0 mask operand above the switch,
+ // but these instructions may use non-v0 mask operands and need to be handled
+ // specifically.
+ case RISCV::VMAND_MM:
+ case RISCV::VMNAND_MM:
+ case RISCV::VMANDN_MM:
+ case RISCV::VMXOR_MM:
+ case RISCV::VMOR_MM:
+ case RISCV::VMNOR_MM:
+ case RISCV::VMORN_MM:
+ case RISCV::VMXNOR_MM:
+ case RISCV::VMSBF_M:
----------------
lukel97 wrote:
The way I'm thinking about it is that reducing the VL for these instructions doesn't change the result of the active elements. And the only demanded elements should be the active elements, so it shouldn't affect the result.
https://github.com/llvm/llvm-project/pull/112231
More information about the llvm-commits
mailing list