]> gcc.gnu.org Git - gcc.git/commit
tree-optimization/101868 - avoid PRE of trapping mems across calls
authorRichard Biener <rguenther@suse.de>
Tue, 17 Aug 2021 06:38:35 +0000 (08:38 +0200)
committerRichard Biener <rguenther@suse.de>
Mon, 8 Nov 2021 13:38:04 +0000 (14:38 +0100)
commit2498de689b735422ef71d93e2afe7ae3e6988bb3
treea06ee1153f624f9e74ad8b79ba6d0808aa445eac
parent8dec0ae6200ae8c56dbeef5ff9acd2214282de67
tree-optimization/101868 - avoid PRE of trapping mems across calls

This backports a fix for the omission of a check of trapping mems
when hoisting them across calls that might not return.  This was
originally done as part of a fix to handle const functions that throw
properly.

2021-08-17  Richard Biener  <rguenther@suse.de>

PR tree-optimization/101373
PR tree-optimization/101868
* tree-ssa-pre.c (prune_clobbered_mems): Also prune trapping
references when the BB may not return.

* gcc.dg/lto/pr101868_0.c: New testcase.
* gcc.dg/lto/pr101868_1.c: Likewise.
* gcc.dg/lto/pr101868_2.c: Likewise.
* gcc.dg/lto/pr101868_3.c: Likewise.

(cherry picked from commit ee875b63b22e30a0dcb4b05f7532c2c416ba6cd0)
gcc/testsuite/gcc.dg/lto/pr101868_0.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/lto/pr101868_1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/lto/pr101868_2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/lto/pr101868_3.c [new file with mode: 0644]
gcc/tree-ssa-pre.c
This page took 0.056639 seconds and 5 git commands to generate.