[llvm] [RISCV][VLOPT] Add support for Vector Fixed-Point Arithmetic Instructions (PR #126483)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 10 01:59:23 PST 2025
================
@@ -1173,8 +1201,16 @@ bool RISCVVLOptimizer::isCandidate(const MachineInstr &MI) const {
const MCInstrDesc &Desc = MI.getDesc();
if (!RISCVII::hasVLOp(Desc.TSFlags) || !RISCVII::hasSEWOp(Desc.TSFlags))
return false;
- if (MI.getNumDefs() != 1)
+
+ if (MI.getNumExplicitDefs() != 1)
+ return false;
+
+ // Some instructions have implicit defs e.g. $vxsat. If they might be read
----------------
lukel97 wrote:
I quickly checked the qemu implementation, it seems to only set it for active elements: https://github.com/qemu/qemu/blob/04d3d0e9f54d4c42759f3810aa135ce314d98dc4/target/riscv/vector_helper.c#L2162-L2179
https://github.com/llvm/llvm-project/pull/126483
More information about the llvm-commits
mailing list