diff options
| author | Jakub Jelinek <jakub@redhat.com> | 2026-01-30 11:42:41 +0100 |
|---|---|---|
| committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2026-01-30 11:42:41 +0100 |
| commit | 238d2fc116cdef31c3d643e71ade0875b5cba110 (patch) | |
| tree | e2b8c92fc2c68d35575af1684d567ab2708ee159 /libjava/gnu/java/security | |
| parent | cffe5fd7c98babd85acf86f3e7f8d02b04416ec2 (diff) | |
| download | gcc-238d2fc116cdef31c3d643e71ade0875b5cba110.zip gcc-238d2fc116cdef31c3d643e71ade0875b5cba110.tar.gz gcc-238d2fc116cdef31c3d643e71ade0875b5cba110.tar.bz2 | |
match.pd: Fix up __imag__ .MUL_OVERFLOW simplification [PR123864]
The integer_minus_onep case is really meant for multiplication by
-1, not by (unsigned char)0xff or (unsigned short)0xffff or 0xffffffffU etc.
We've already tested that the first operand is signed (otherwise the
earlier case is used) and also that int_fits_type_p (@1, TREE_TYPE (@0)),
but if @0 is signed and @1 is unsigned all ones with smaller precision
than that, it fits into @0's type, integer_minus_onep will be true
and it still should be handled through the ranges, not as @0 == min.
2026-01-30 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/123864
* match.pd (__builtin_mul_overflow_p (x, cst, (stype) 0) ->
x > stype_max / cst || x < stype_min / cst): Only check
integer_minus_onep for signed types.
* gcc.c-torture/execute/pr123864.c: New test.
* gcc.dg/torture/pr123864.c: New test.
Diffstat (limited to 'libjava/gnu/java/security')
0 files changed, 0 insertions, 0 deletions
