[Bug tree-optimization/95295] g++ produces incorrect code with -O3 for loops

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon May 25 11:39:42 GMT 2020


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

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

https://gcc.gnu.org/g:4acca1c0635dfa43cd8c4bfe2b22e17909fc23a3

commit r11-609-g4acca1c0635dfa43cd8c4bfe2b22e17909fc23a3
Author: Richard Biener <rguenther@suse.de>
Date:   Mon May 25 10:09:44 2020 +0200

    tree-optimization/95295 - fix wrong-code with SM

    We failed to compare the rematerialized store values when merging
    paths after walking PHIs.

    2020-05-25  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/95295
            * tree-ssa-loop-im.c (sm_seq_valid_bb): Compare remat stores
            RHSes and drop to full sm_other if they are not equal.

            * gcc.dg/torture/pr95295-1.c: New testcase.
            * gcc.dg/torture/pr95295-2.c: Likewise.
            * gcc.dg/torture/pr95283.c: Likewise.


More information about the Gcc-bugs mailing list