afonso360 opened PR #6815 from afonso360:riscv-ifma
to bytecodealliance:main
:
:wave: Hey,
This PR adds support for SIMD integer fused multiply add/subtract instructions to RISC-V. These instructions modify one of the source registers, so I've added a new instruction format for it.
We have 4 variants of this instruction (§11.13. Vector Single-Width Integer Multiply-Add Instructions), I've only used two, since it looks like
vmadd
/vnmsub
match the same pattern but just modify different registers. I'm not entirely sure how to expose this, since it looks like just a regalloc optimization.Additionally I couldn't find a way to match
isub+imul
, It looks likevnmsac
does not match that, but maybe I'm missing something!
afonso360 requested jameysharp for a review on PR #6815.
afonso360 requested wasmtime-compiler-reviewers for a review on PR #6815.
jameysharp submitted PR review:
Looks good!
These patterns are already being generated by fuzzgen, right? I've lost track of what works right now.
While reading this it occurred to me that someday we ought to have a lot more egraph rules for
splat
, such as rewriting(imul (splat x) (splat y))
to (splat (imul x y)). Those should probably go in
cranelift/codegen/src/opts/vector.isle, and move some existing rules from
extends.isle` there too I think.
afonso360 merged PR #6815.
Last updated: Dec 23 2024 at 12:05 UTC