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

--- Comment #24 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Jakub Jelinek
<ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:0f717ba5975ab42e1176db4cd2384f1862872519

commit r9-8895-g0f717ba5975ab42e1176db4cd2384f1862872519
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Wed May 6 09:31:19 2020 +0200

    combine: Don't replace SET_SRC with REG_EQUAL note content if SET_SRC has
side-effects [PR94873]

    There were some discussions about whether REG_EQUAL notes are valid on
insns with a single
    set which contains auto-inc-dec side-effects in the SET_SRC and the
majority thinks that
    it should be valid.  So, this patch fixes the combiner to punt in that
case, because otherwise
    the auto-inc-dec side-effects from the SET_SRC are lost.

    2020-05-06  Jakub Jelinek  <ja...@redhat.com>

            PR rtl-optimization/94873
            * combine.c (combine_instructions): Don't optimize using REG_EQUAL
            note if SET_SRC (set) has side-effects.

            * gcc.dg/pr94873.c: New test.

    (cherry picked from commit 8982e39b46b1e4a4b09022ddebd758b77ab73bac)

Reply via email to