MarinPostma opened PR #10147 from MarinPostma:packed-integer-arithmetic
to bytecodealliance:main
:
implements the following instructions for winch x64:
i8x16.add
i8x16.add_sat_u
i8x16.add_sat_s
i16x8.add
i16x8.add_sat_u
i16x8.add_sat_s
i32x4.add
i64x2.add
i8x16.sub
i8x16.sub_sat_u
i8x16.sub_sat_s
i16x8.sub
i16x8.sub_sat_u
i16x8.sub_sat_s
i32x4.sub
i64x2.sub
i8x16.mul
i16x8.mul
i32x4.mul
i64x2.mul
#8093
MarinPostma requested fitzgen for a review on PR #10147.
MarinPostma requested wasmtime-compiler-reviewers for a review on PR #10147.
MarinPostma requested wasmtime-core-reviewers for a review on PR #10147.
MarinPostma edited PR #10147:
implements the following instructions for winch x64:
i8x16.add
i8x16.add_sat_u
i8x16.add_sat_s
i16x8.add
i16x8.add_sat_u
i16x8.add_sat_s
i32x4.add
i64x2.add
i8x16.sub
i8x16.sub_sat_u
i8x16.sub_sat_s
i16x8.sub
i16x8.sub_sat_u
i16x8.sub_sat_s
i32x4.sub
i64x2.sub
i16x8.mul
i32x4.mul
i64x2.mul
#8093
MarinPostma updated PR #10147.
MarinPostma submitted PR review.
MarinPostma created PR review comment:
naming-wise, I'm completely sure what to call those. Maybe
vector_add
is more appropriate?
saulecabrera commented on PR #10147:
I can take this review.
saulecabrera requested saulecabrera for a review on PR #10147.
MarinPostma updated PR #10147.
MarinPostma updated PR #10147.
saulecabrera submitted PR review.
saulecabrera created PR review comment:
I don't think we should make this a hard requirement, given that our baseline is AVX.
Given that Intel suggests that there's no penalty on mixing AVX with AVX512 instructions , we could emit AVX512 if they are available, however in case they aren't we still need to emit a fallback to avoid bumping our baseline for this operation. For reference: https://github.com/bytecodealliance/wasmtime/blob/main/cranelift/codegen/src/isa/x64/lower.isle#L1121
saulecabrera created PR review comment:
I think the naming is fine here, as far as I can tell, we don't have any other
vector
naming convention.
MarinPostma updated PR #10147.
MarinPostma updated PR #10147.
MarinPostma updated PR #10147.
MarinPostma submitted PR review.
MarinPostma created PR review comment:
my bad, I misunderstood your DM about what we expected to support. I have ported cranelift fallback implementation.
MarinPostma updated PR #10147.
MarinPostma submitted PR review.
MarinPostma created PR review comment:
hold on I just foudn a bug
MarinPostma updated PR #10147.
MarinPostma edited PR review comment.
MarinPostma updated PR #10147.
MarinPostma submitted PR review.
MarinPostma created PR review comment:
Fixed
MarinPostma updated PR #10147.
MarinPostma updated PR #10147.
saulecabrera submitted PR review:
LGTM, thanks!
saulecabrera merged PR #10147.
Last updated: Feb 28 2025 at 03:10 UTC