[Bug tree-optimization/124288] [16 Regression] testsuite/gcc.dg/torture/vec-cvt-1.c failure on -m32 since r16-7762-g0383e6c398a
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Mar 8 05:21:43 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124288
--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-15 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:e8af0cc876147408fcfed982047025b4271d48f1
commit r15-10907-ge8af0cc876147408fcfed982047025b4271d48f1
Author: Jakub Jelinek <jakub@redhat.com>
Date: Mon Mar 2 15:44:40 2026 +0100
testsuite: Fix up vec-cvt-1.c for excess precision target [PR124288]
The intent of the code is to find the largest (or smallest) representable
float (or double) smaller (or greater than) or equal to the given integral
maximum (or minimum).
The code uses volatile vars to avoid excess precision, but was relying on
(volatile_var1 = something1 - something2) == volatile_var2
to actually store the subtraction into volatile var and read it from there,
making it an optimization barrier. That is not the case, we compare
directly
the rhs of the assignment expression with volatile_var2, so on excess
precision
targets it can result in unwanted optimizations.
Fixed by using a comma expression to make sure comparison doesn't know the
value to compare.
2026-03-02 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/124288
* gcc.dg/torture/vec-cvt-1.c (FLTTEST): Use comma expression
to store into {flt,dbl}m{in,ax} and read from it again for
comparison.
(cherry picked from commit fd0f08443955410179d1b06c80bc5a3331d2916d)
More information about the Gcc-bugs
mailing list