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

AK: Add generic SIMD shuffle/reverse functions #617

Merged
merged 5 commits into from
Jul 17, 2024

Conversation

alimpfard
Copy link
Contributor

(cherry picked from commit 1b8fd5c)

cc @Hendiadyoin1.

@Hendiadyoin1
Copy link
Contributor

Ooops I think the AK ones are the wrong way around,
(Also note that the code got slightly better with dans PR, regarding __builtin_bitcast shenanigans)

@alimpfard
Copy link
Contributor Author

lol oops

@DanShaders
Copy link
Contributor

Also note that the code got slightly better with dans PR

SerenityOS/serenity@56b7f9e and SerenityOS/serenity@2b65b62

@alimpfard
Copy link
Contributor Author

I'm not sure if disabling -Wpsabi globally is safe to do in here; there are other libraries.
I'll pull the bit_cast commit in though.

Hendiadyoin1 and others added 5 commits July 14, 2024 22:55
This necessitates marking bit_cast as ALWAYS_INLINE since emitting it as
a function call there will create an unnecessary potential SSE
registers -> plain registers/memory round-trip.
Otherwise we'd hit a VERIFY in AK::SIMD::shuffle() when that operand
contains an out-of-range value, the spec tests indicate that a swizzle
with an out-of-range index should return 0.

(cherry picked from commit cd454a1)
@ADKaster ADKaster merged commit 144e822 into LadybirdBrowser:master Jul 17, 2024
6 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.

None yet

4 participants