[Bug tree-optimization/101868] [9/10/11 Regression] Incorrect reordering in -O2 with LTO

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Aug 17 09:21:52 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101868

--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:ee875b63b22e30a0dcb4b05f7532c2c416ba6cd0

commit r11-8875-gee875b63b22e30a0dcb4b05f7532c2c416ba6cd0
Author: Richard Biener <rguenther@suse.de>
Date:   Tue Aug 17 08:38:35 2021 +0200

    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.


More information about the Gcc-bugs mailing list