public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/104156] [12 Regression] -fcompare-debug failure with -O2 -funswitch-loops since r12-4526-gd8edfadfc7a9795b
Date: Fri, 21 Jan 2022 11:19:22 +0000	[thread overview]
Message-ID: <bug-104156-4-vCIHGjnMfp@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-104156-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #5 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:f953c8bc5bf314a57a6ba347ee6f5f5e3f1dad53

commit r12-6790-gf953c8bc5bf314a57a6ba347ee6f5f5e3f1dad53
Author: Richard Biener <rguenther@suse.de>
Date:   Fri Jan 21 10:19:58 2022 +0100

    tree-optimization/104156 - fix unswitching compare-debug issue

    When hoisting guards the unswitching pass does not properly ignore
    debug stmts when looking for uses outside of the loop of defs
    produced in the skipped region.  The following rectifies this
    by instead collecting them and resetting them after the transform.

    2022-01-21  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/104156
            * tree-ssa-loop-unswitch.cc (tree_unswitch_outer_loop):
            Collect and reset debug stmts with out-of-loop uses when
            hoisting guards.
            (find_loop_guard): Adjust.
            (empty_bb_without_guard_p): Likewise.  Ignore debug stmts.
            (used_outside_loop_p): Push debug uses to a vector of
            debug stmts to reset.
            (hoist_guard): Adjust -fopt-info category.

            * gcc.dg/loop-unswitch-6.c: New testcase.

  parent reply	other threads:[~2022-01-21 11:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-21  4:57 [Bug c/104156] New: -fcompare-debug failure with -O3 cnsun at uwaterloo dot ca
2022-01-21  8:17 ` [Bug tree-optimization/104156] [12 Regression] " pinskia at gcc dot gnu.org
2022-01-21  8:27 ` [Bug tree-optimization/104156] [12 Regression] -fcompare-debug failure with -O2 -funswitch-loops since r12-4526-gd8edfadfc7a9795b marxin at gcc dot gnu.org
2022-01-21  8:42 ` pinskia at gcc dot gnu.org
2022-01-21  9:00 ` rguenth at gcc dot gnu.org
2022-01-21 11:19 ` cvs-commit at gcc dot gnu.org [this message]
2022-01-21 11:22 ` rguenth at gcc dot gnu.org
2022-01-22  2:22 ` cnsun at uwaterloo dot ca
2022-01-22 20:15 ` pinskia at gcc dot gnu.org
2022-01-22 21:37 ` cnsun at uwaterloo dot ca
2022-01-24  7:57 ` rguenther at suse dot de

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-104156-4-vCIHGjnMfp@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).