aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2023-10-31 10:13:13 +0100
committerRichard Biener <rguenther@suse.de>2023-10-31 13:10:04 +0100
commite3da1d7bb288c8c864f0284bc4bc5877b466a2f7 (patch)
tree62538be0a67da1b32b62660c4977d05a7da05c4d /libgcc
parent1cf5dc05c678232b52ac0572a94b891131ef48f0 (diff)
downloadgcc-e3da1d7bb288c8c864f0284bc4bc5877b466a2f7.zip
gcc-e3da1d7bb288c8c864f0284bc4bc5877b466a2f7.tar.gz
gcc-e3da1d7bb288c8c864f0284bc4bc5877b466a2f7.tar.bz2
tree-optimization/112305 - SCEV cprop and conditional undefined overflow
The following adjusts final value replacement to also rewrite the replacement to defined overflow behavior if there's conditionally evaluated stmts (with possibly undefined overflow), not only when we "folded casts". The patch hooks into expression_expensive for this. PR tree-optimization/112305 * tree-scalar-evolution.h (expression_expensive): Adjust. * tree-scalar-evolution.cc (expression_expensive): Record when we see a COND_EXPR. (final_value_replacement_loop): When the replacement contains a COND_EXPR, rewrite it to defined overflow. * tree-ssa-loop-ivopts.cc (may_eliminate_iv): Adjust. * gcc.dg/torture/pr112305.c: New testcase.
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions