[Bug target/119465] gcc.target/i386/pr55583.c FAILs with 32-bit-default compiler
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Mar 26 11:19:58 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119465
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:7b7c0fe37332290fad9b31bf3ae05c28375e0a76
commit r15-8926-g7b7c0fe37332290fad9b31bf3ae05c28375e0a76
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Mar 26 12:19:14 2025 +0100
i386: Fix up pr55583.c testcase [PR119465]
In r15-4289 H.J. fixed up the pr55583.c testcase to use unsigned long long
or long long instead of unsigned long or long. That change looks correct
to
me because the
void test64r () { b = ((u64)b >> n) | (a << (64 - n)); }
etc. functions otherwise aren't really 64-bit rotates, but something that
triggers UB all the time (at least one of the shifts is out of bounds).
I assume that change fixed the FAILs on -mx32, but it caused
FAIL: gcc.target/i386/pr55583.c scan-assembler-times (?n)shldl?[\\\\t
]*\\\\\$2 1
FAIL: gcc.target/i386/pr55583.c scan-assembler-times (?n)shrdl?[\\\\t
]*\\\\\$2 2
regression on i686-linux (but just for -m32 without defaulting to SSE2 or
what). The difference is that for say -m32 -march=x86-64 the stv pass
handles some of the rotates in SSE and so we get different sh[rl]dl
instruction counts from the case when SSE isn't enabled and stv pass isn't
done.
The following patch fixes that by disabling SSE for ia32 and always testing
for the same number of instructions.
Tested with all of
make check-gcc
RUNTESTFLAGS='--target_board=unix\{-m32/-march=x86-64,-m32/-march=i686,-mx32,-m64\}
i386.exp=pr55583.c'
2025-03-26 Jakub Jelinek <jakub@redhat.com>
PR target/55583
PR target/119465
* gcc.target/i386/pr55583.c: Add -mno-sse -mno-mmx to
dg-additional-options. Expect 4 shrdl and 2 shldl instructions on
ia32.
More information about the Gcc-bugs
mailing list