aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/generated/maxval_m2.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2024-10-01 10:37:16 +0200
committerRichard Biener <rguenth@gcc.gnu.org>2024-10-01 11:44:50 +0200
commit3e1bd6470e4deba1a3ad14621037098311ad1350 (patch)
tree3abc8e1f801ffce0d0ddb3d5ad3c636f133f3511 /libgfortran/generated/maxval_m2.c
parentde25f1729d212c11d6e2955130f4eb1d272b5ce7 (diff)
downloadgcc-3e1bd6470e4deba1a3ad14621037098311ad1350.zip
gcc-3e1bd6470e4deba1a3ad14621037098311ad1350.tar.gz
gcc-3e1bd6470e4deba1a3ad14621037098311ad1350.tar.bz2
tree-optimization/116906 - unsafe PRE with never executed edges
When we're computing ANTIC for PRE we treat edges to not yet visited blocks as having a maximum ANTIC solution to get at an optimistic solution in the iteration. That assumes the edges visted eventually execute. This is a wrong assumption that can lead to wrong code (and not only non-optimality) when possibly trapping expressions are involved as the testcases in the PR show. The following mitigates this by pruning trapping expressions from ANTIC computed when maximum sets are involved. PR tree-optimization/116906 * tree-ssa-pre.cc (prune_clobbered_mems): Add clean_traps argument. (compute_antic_aux): Direct prune_clobbered_mems to prune all traps when any MAX solution was involved in the ANTIC computation. (compute_partial_antic_aux): Adjust. * gcc.dg/pr116906-1.c: New testcase. * gcc.dg/pr116906-2.c: Likewise.
Diffstat (limited to 'libgfortran/generated/maxval_m2.c')
0 files changed, 0 insertions, 0 deletions