Stream: git-wasmtime

Topic: wasmtime / PR #6533 egraphs: Transform `{u,s}widen_{low,h...


view this post on Zulip Wasmtime GitHub notifications bot (Jun 06 2023 at 22:21):

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 into splat+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 that sextend the result.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 06 2023 at 22:21):

afonso360 requested fitzgen for a review on PR #6533.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 06 2023 at 22:21):

afonso360 requested wasmtime-compiler-reviewers for a review on PR #6533.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 06 2023 at 22:38):

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.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 07 2023 at 11:50):

afonso360 merged PR #6533.


Last updated: Nov 22 2024 at 17:03 UTC