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

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

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

commit r11-8592-ged8181b187f9edf8711103b2ddfd95d368f2641a
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Thu Jun 10 09:28:27 2021 +0200

    ifcvt: Fix -fcompare-debug bug [PR100852]

    The following testcase fails -fcompare-debug, because it is ifcvt optimized
    into umin only with -g0 and not with -g - the function(s) use
    prev_nonnote_insn, which without -g finds a real insn the code is looking
    for, while with -g finds a DEBUG_INSN.

    2021-06-10  Jakub Jelinek  <ja...@redhat.com>

            PR debug/100852
            * ifcvt.c (noce_get_alt_condition, noce_try_abs): Use
            prev_nonnote_nondebug_insn instead of prev_nonnote_insn.

            * g++.dg/opt/pr100852.C: New test.

    (cherry picked from commit 2d2ed777b23ab6503027039e0adbfe1162f52b2f)

Reply via email to