[Bug tree-optimization/106883] SLSR may generate signed wrap
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jan 23 16:03:56 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106883
--- Comment #11 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pinskia@gcc.gnu.org>:
https://gcc.gnu.org/g:e5bcb08d132bf753178a2b30962b4a9d3452c4f2
commit r16-7000-ge5bcb08d132bf753178a2b30962b4a9d3452c4f2
Author: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
Date: Wed Jan 14 16:44:17 2026 -0800
slsr: Fix some undefined/overflow introducing bugs in SLSR [PR106883]
This fixes the first part of SLSR incorrectly inserting undefined code
(overflow)
into the IR. The easiest way is to rewrite the statement after creating it
using rewrite_to_defined_unconditional.
This fixes the testcases from PR 121347 (and a few others) which all cause
an
infinite loops to appear.
I will be posting the fix for replace_rhs_if_not_dup later and at that
point I
will add a few testcases.
Bootstrapped and tested on x86_64-linux-gnu with no regressions.
PR tree-optimization/121347
PR tree-optimization/106883
gcc/ChangeLog:
* gimple-ssa-strength-reduction.cc (insert_initializers): Rewrite
newly inserted statements for undefinedness (overflow).
Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
More information about the Gcc-bugs
mailing list