x86 32 bit lacks the support for pmaxsb, pminsb, pmaxuw, pminuw, pmaxud and pminud instructions
Created attachment 187308 [details] patch
Add SSE4.1 min/max instructions for x86 32 bit Support pmaxsb, pminsb, pmaxuw, pminuw, pmaxud and pminud instructions in guest_x86_toIR.c and host_x86_isel.c. Move test functions from amd64/sse4-64.c to sse4-common.h and update none/tests/x86/sse4-x86.c and sse4-x86.stdout.exp to test all min/max instructions.
To keep the .exp diff smaller it would be nice to add the new tests at the end.
Please add the bug number and summary to NEWS and https://bugs.kde.org/show_bug.cgi?id=512873 at the end of the commit message. The amd64 variant has a /* FIXME: this needs an alignment check */ and the intel sse4 manual says Exceptions #GP(0) If a memory operand is not aligned on a 16-byte boundary. But apparently this hasn't been a real issue on amd64 either. Probably no program relies on having an exception raised on non-aligned memory access. which kind of makes sense... Maybe do add a similar comment though. The code generation is pretty generic, same as for amd64 case. The tests look ok, although I would reorder the test to make the .exp diff smaller. Please feel free to push with (or without) those changes.
*** Bug 476978 has been marked as a duplicate of this bug. ***
commit fb25ce838c953c010883e6bc309fc672a78073e1 Author: Alexandra Hájková <ahajkova@redhat.com> Date: Tue Dec 2 11:06:58 2025 -0500 Add SSE4.1 min/max instructions for x86 32 bit Support pmaxsb, pminsb, pmaxuw, pminuw, pmaxud and pminud instructions in guest_x86_toIR.c and host_x86_isel.c. Move test functions from amd64/sse4-64.c to sse4-common.h and update none/tests/x86/sse4-x86.c and sse4-x86.stdout.exp to test all min/max instructions. BZ: https://bugs.kde.org/show_bug.cgi?id=512873