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 bootstrap/100373] [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057
Date: Thu, 06 May 2021 08:08:42 +0000	[thread overview]
Message-ID: <bug-100373-4-SCeD1hlEsR@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-100373-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #13 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:b5254d6b75fe6be669396cd1261f1cba829cc451

commit r12-558-gb5254d6b75fe6be669396cd1261f1cba829cc451
Author: Richard Biener <rguenther@suse.de>
Date:   Wed May 5 10:15:27 2021 +0200

    ipa/100373 - fix emutls lowering compare-debug issue

    emutls figured that tls uses in debug-insns need lowering but
    that obviously has effects on code-generation as can be seen
    in the following IL diff with the new testcase:

       <bb 2> [local count: 1073741824]:
    -  a = 0;
    +  # DEBUG BEGIN_STMT
       _4 = __builtin___emutls_get_address (&__emutls_v.b);
    +  # DEBUG D#1 => *_4
    +  # DEBUG d => (long int) D#1
    +  # DEBUG BEGIN_STMT
    +  a = 0;
    +  # DEBUG BEGIN_STMT
       *_4 = 0;
       return;

    where it figured the debug use of b in the original

      <bb 2> [local count: 1073741824]:
      # DEBUG BEGIN_STMT
      # DEBUG D#1 => b
      # DEBUG d => (long int) D#1
      # DEBUG BEGIN_STMT
      a = 0;

    needs lowering (it maybe does when we want to produce perfect
    debug but that's just bad luck).

    The following patch fixes this by avoiding to create a new
    emutls address when visiting debug stmts and instead resets them.
    Another option might be to simply not lower debug stmt uses
    but I have no way to verify actual debug info for this.

    2021-05-05  Richard Biener  <rguenther@suse.de>

            PR ipa/100373
            * tree-emutls.c (gen_emutls_addr): Pass in whether we're
            dealing with a debug use and only query existing addresses
            if so.
            (lower_emutls_1): Avoid splitting out addresses for debug
            stmts, reset the debug stmt when we fail to find existing
            lowered addresses.
            (lower_emutls_phi_arg): Set wi.stmt.

            * gcc.dg/pr100373.c: New testcase.

  parent reply	other threads:[~2021-05-06  8:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-01 12:47 [Bug bootstrap/100373] New: " iains at gcc dot gnu.org
2021-05-01 12:49 ` [Bug bootstrap/100373] " iains at gcc dot gnu.org
2021-05-02 15:09 ` iains at gcc dot gnu.org
2021-05-03  8:00 ` rguenth at gcc dot gnu.org
2021-05-04 10:44 ` rguenth at gcc dot gnu.org
2021-05-04 10:52 ` iains at gcc dot gnu.org
2021-05-04 10:55 ` iains at gcc dot gnu.org
2021-05-04 11:03 ` rguenther at suse dot de
2021-05-04 23:45 ` iains at gcc dot gnu.org
2021-05-04 23:48 ` iains at gcc dot gnu.org
2021-05-05  8:08 ` rguenth at gcc dot gnu.org
2021-05-05  8:48 ` rguenth at gcc dot gnu.org
2021-05-05 10:20 ` iains at gcc dot gnu.org
2021-05-05 11:58 ` rguenth at gcc dot gnu.org
2021-05-05 23:44 ` iains at gcc dot gnu.org
2021-05-06  8:08 ` cvs-commit at gcc dot gnu.org [this message]
2021-05-06  8:09 ` rguenth at gcc dot gnu.org

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-100373-4-SCeD1hlEsR@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).