afonso360 opened PR #6533 from afonso360:cranelift-widen-splat
to bytecodealliance:main
:
:wave: Hey,
This PR adds an egraph optimization that transforms
swiden_low+splat
intosplat+sextend
(and similar variations).The primary motivation for this is that I'm working on SIMD widening arithmetic instructions in the RISC-V backend, and would like to match all of those patterns with just
splat+extend
. That being said, It is also probably beneficial to do these transforms (at least for RISC-V) since we have a bunch of scalar instructions thatsextend
the result.
afonso360 requested fitzgen for a review on PR #6533.
afonso360 requested wasmtime-compiler-reviewers for a review on PR #6533.
jameysharp submitted PR review:
Good idea!
swiden_high
et al only support doubling the width and halving the number of lanes, right? I think these rewrite rules would still be correct if it supported e.g. i8->i64 but I'd want to see tests for that case just to be sure. But if that case can't happen due to constraints on the widening instructions then that's not an issue.
afonso360 merged PR #6533.
Last updated: Dec 23 2024 at 12:05 UTC