Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v3i/simd]: Implement min, max, abs instructions for f32 and f64 #129

Merged
merged 2 commits into from
Nov 6, 2023

Conversation

haoyu-zc
Copy link
Contributor

@haoyu-zc haoyu-zc commented Nov 2, 2023

Tested by:

make v3i -j && bin/spectest.v3i -tk test/regress/simd/simd_f32x4.bin.wast
make v3i -j && bin/spectest.v3i -tk test/regress/simd/simd_f32x4_pmin_pmax.bin.wast
make v3i -j && bin/spectest.v3i -tk test/regress/simd/simd_f64x2.bin.wast
make v3i -j && bin/spectest.v3i -tk test/regress/simd/simd_f64x2_pmin_pmax.bin.wast

if (a < b) return b;
return a;
}
def F64X2_PMIN(a: double, b: double) -> double {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be simplified to if(a > b, b, a)?

@haoyu-zc
Copy link
Contributor Author

haoyu-zc commented Nov 4, 2023

Alright I turned my head around... Pushed a new commit.

Copy link
Owner

@titzer titzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@titzer titzer merged commit 0e4bbfb into titzer:master Nov 6, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants