[Bug ipa/119530] [15 regression] wrong code at -O{s,2,3} with "-fno-tree-vrp -fno-inline" on x86_64-linux-gnu since r15-6294-g96fb71883d438b

2025-04-14 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119530

--- Comment #4 from GCC Commits  ---
The master branch has been updated by Martin Jambor :

https://gcc.gnu.org/g:de1c734a8ae034c92f485e7f58b7fcb1c921ecd2

commit r15-9427-gde1c734a8ae034c92f485e7f58b7fcb1c921ecd2
Author: Martin Jambor 
Date:   Mon Apr 14 14:21:15 2025 +0200

ipa-cp: Make propagation of bits in IPA-CP aware of type conversions
(PR119318)

After the propagation of constants and value ranges, it turns out
that the propagation of known bits also needs to be made aware of any
intermediate types in which any arithmetic operations are made and
must limit its precision there.  This implements just that, using the
newly collected and streamed types of the operations involved.

This version removed the extra check that the type of a formal
parameter is known pointed out in Honza in his review because I agree
it is currently always known.  I have also added the testcase of PR
119530 which is a duplicate of this bug.

gcc/ChangeLog:

2025-04-11  Martin Jambor  

PR ipa/119318
* ipa-cp.cc (ipcp_bits_lattice::meet_with_1): Set all mask bits
not covered by precision to one.
(ipcp_bits_lattice::meet_with): Likewise.
(propagate_bits_across_jump_function): Use the stored operation
type to perform meet with other lattices.

gcc/testsuite/ChangeLog:

2025-04-11  Martin Jambor  

PR ipa/119318
* gcc.dg/ipa/pr119318.c: New test.
* gcc.dg/ipa/pr119530.c: Likwise.

[Bug ipa/119530] [15 regression] wrong code at -O{s,2,3} with "-fno-tree-vrp -fno-inline" on x86_64-linux-gnu since r15-6294-g96fb71883d438b

2025-03-31 Thread jamborm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119530

Martin Jambor  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|NEW |RESOLVED

--- Comment #3 from Martin Jambor  ---
Thanks for reporting, but this is a duplicate of PR 119318.

*** This bug has been marked as a duplicate of bug 119318 ***