diff options
author | Jakub Jelinek <jakub@redhat.com> | 2025-01-17 11:30:07 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2025-01-17 11:30:07 +0100 |
commit | 3ab9eb6946f7b832834b3d808c5617935e0be727 (patch) | |
tree | 34cbc4dd3ce71a28f97bb6d227d4da05d730ca10 /libphobos/src | |
parent | b5a069203fc074ab75d994c4a7e0f2db6a0a00fd (diff) | |
download | gcc-3ab9eb6946f7b832834b3d808c5617935e0be727.zip gcc-3ab9eb6946f7b832834b3d808c5617935e0be727.tar.gz gcc-3ab9eb6946f7b832834b3d808c5617935e0be727.tar.bz2 |
match.pd: Fix (FTYPE) N CMP (FTYPE) M optimization for GENERIC [PR118522]
The last case of this optimization assumes that if 2 integral types
have same precision and TYPE_UNSIGNED, then they are uselessly convertible.
While that is very likely the case for GIMPLE, it is not the case for
GENERIC, so the following patch adds there a convert so that the
optimization produces also valid GENERIC. Without it we got
(int) p == b where b had _BitInt(32) type, so incompatible types.
2025-01-17 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/118522
* match.pd ((FTYPE) N CMP (FTYPE) M): Add convert, as in GENERIC
integral types with the same precision and sign might actually not
be compatible types.
* gcc.dg/bitint-120.c: New test.
Diffstat (limited to 'libphobos/src')
0 files changed, 0 insertions, 0 deletions