tree-optimization/112320 - bougs debug IL after SCCP
authorRichard Biener <rguenther@suse.de>
Thu, 2 Nov 2023 09:39:03 +0000 (10:39 +0100)
committerRichard Biener <rguenther@suse.de>
Thu, 2 Nov 2023 10:27:51 +0000 (11:27 +0100)
commitc05f748218a0d556972212d6aecfce0eb4c8a31c
treed115a9490db0fe3095264af573fed7bd3bd5c5d2
parent1ae85e6a552239b253a390db2a604b2eb0f9f536
tree-optimization/112320 - bougs debug IL after SCCP

The following addresses wrong debug IL created by SCCP rewriting stmts
to defined overflow.  I addressed another inefficiency there but
needed to adjust the API of rewrite_to_defined_overflow for this
which is now taking a stmt iterator for in-place operation and a
stmt for sequence producing because gsi_for_stmt doesn't work for
stmts not in the IL.

PR tree-optimization/112320
* gimple-fold.h (rewrite_to_defined_overflow): New overload
for in-place operation.
* gimple-fold.cc (rewrite_to_defined_overflow): Add stmt
iterator argument to worker, define separate API for
in-place and not in-place operation.
* tree-if-conv.cc (predicate_statements): Simplify.
* tree-scalar-evolution.cc (final_value_replacement_loop):
Likewise.
* tree-ssa-ifcombine.cc (pass_tree_ifcombine::execute): Adjust.
* tree-ssa-reassoc.cc (update_range_test): Likewise.

* gcc.dg/pr112320.c: New testcase.
gcc/gimple-fold.cc
gcc/gimple-fold.h
gcc/testsuite/gcc.dg/pr112320.c [new file with mode: 0644]
gcc/tree-if-conv.cc
gcc/tree-scalar-evolution.cc
gcc/tree-ssa-ifcombine.cc
gcc/tree-ssa-reassoc.cc
This page took 0.068371 seconds and 6 git commands to generate.