Skip to content

Commit 92a73e8

Browse files
[RISCV][VLOPT] Add getOperandInfo for saturating signed multiply
These instructions are covered by the existing tests. We do not add them to isSupportedInstr because they have a tied def which means they will never get to that point in isCandidate.
1 parent b24caf3 commit 92a73e8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,11 @@ static OperandInfo getOperandInfo(const MachineOperand &MO,
378378
case RISCV::VASUBU_VX:
379379
case RISCV::VASUB_VV:
380380
case RISCV::VASUB_VX:
381+
// Vector Single-Width Fractional Multiply with Rounding and Saturation
382+
// EEW=SEW. EMUL=LMUL. The instruction produces 2*SEW product internally but
383+
// saturates to fit into SEW bits.
384+
case RISCV::VSMUL_VV:
385+
case RISCV::VSMUL_VX:
381386
// Vector Single-Width Scaling Shift Instructions
382387
// EEW=SEW. EMUL=LMUL.
383388
case RISCV::VSSRL_VI:

0 commit comments

Comments
 (0)