]> gcc.gnu.org Git - gcc.git/commit
tree-optimization/110243 - IVOPTs introducing undefined overflow
authorRichard Biener <rguenther@suse.de>
Fri, 20 Oct 2023 12:08:46 +0000 (14:08 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 20 Oct 2023 13:15:25 +0000 (15:15 +0200)
commit44e7e4498c3cdc27e087ab80aa76dac41819702f
tree2be66de4baf22f4ae5d32daf147f5ee9a1e771e4
parentd70575f542f575133eb4c49eda89ab61eedf83b8
tree-optimization/110243 - IVOPTs introducing undefined overflow

The following addresses IVOPTs rewriting expressions in its
strip_offset without caring for definedness of overflow.  Rather
than the earlier attempt of just using the proper
split_constant_offset from data-ref analysis the following adjusts
IVOPTs helper trying to minimize changes from this fix, possibly
easing backports.

PR tree-optimization/110243
PR tree-optimization/111336
* tree-ssa-loop-ivopts.cc (strip_offset_1): Rewrite
operations with undefined behavior on overflow to
unsigned arithmetic.

* gcc.dg/torture/pr110243.c: New testcase.
* gcc.dg/torture/pr111336.c: Likewise.
gcc/testsuite/gcc.dg/torture/pr110243.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/torture/pr111336.c [new file with mode: 0644]
gcc/tree-ssa-loop-ivopts.cc
This page took 0.067423 seconds and 5 git commands to generate.