public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/108984] [13 Regression] LTO bootstrap causes testsuite ICE
Date: Wed, 01 Mar 2023 12:14:49 +0000	[thread overview]
Message-ID: <bug-108984-4-Bimk9Yty30@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108984-4@http.gcc.gnu.org/bugzilla/>

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu.org

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
.optimized of LTRANS unit 60 has

  # DEBUG BEGIN_STMT
  # DEBUG D#456 => -align_bytes_448
  # DEBUG D#453 => (long int) D#456
  # DEBUG D#245 => 0
  # DEBUG arg => D#453
  # DEBUG INLINE_ENTRY gen_rtx_CONST_INT
  # DEBUG D#246 => D#245
  # DEBUG mode => D#246
  _1005 = 64 - align_bytes_448;
  _1045 = (long int) _1005;
  _1046 = const_int_rtx[_1045];
  # DEBUG mode => NULL
  # DEBUG arg => NULL
  _95 = this_target_rtl;
  _96 = _95->x_global_rtl[0];
  _97 = gen_and2_insn (_96, _1046);

and after IPA we see

  # DEBUG BEGIN_STMT
  _92 = -align_bytes_448;
  _93 = (long int) _92;
  # DEBUG D#245ptD.0 => 0
  arg_1327 = _93;
  # DEBUG arg => arg_1327
  # DEBUG arg => arg_1327
  # DEBUG INLINE_ENTRY gen_rtx_CONST_INT
  # DEBUG D#246ptD.0 => D#245ptD.0
  # DEBUG mode => D#246ptD.0
  _1042 = arg_1327;
  _1043 = (unsigned long) _1042;
  _1044 = _1043 + 64;
  if (_1044 <= 128)
    goto <bb 59>; [51.12%]
  else
    goto <bb 60>; [48.88%]

  <bb 59> [local count: 67075190]:
  _1045 = _1042 + 64;
  _1046 = const_int_rtx[_1045];
  _1258 = _1046;
  # DEBUG arg => NULL
  # DEBUG mode => NULL
  # DEBUG arg => NULL
  _94 = _1258;
  _95 = this_target_rtl;
  _96 = _95->x_global_rtl[0];
  # USE = anything
  # CLB = anything
  _97 = gen_and2_insn (_96, _94);
  # USE = anything
  # CLB = anything
  insn_472 = emit_insn (_97);
  # DEBUG insn => insn_472
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG _rtx => insn_472
  # DEBUG BEGIN_STMT
  _98 = insn_472->code;
  _99 = _98 + 65528;
  switch (_98) <default: <L12> [0.00%], case 8 ... 11: <L13> [100.00%], case
13: <L13> [100.00%], case 25: <L13> [100.00%]>

  <bb 60> [local count: 64136059]:
  _1047 = const_int_htab;
  _1048 = (unsigned int) _1042;
  # USE = anything
  # CLB = anything
  __builtin_unreachable ();

so it looks like the else path materialized to be unreachable for some
reason.  Before IPA we have

  _92 = -align_bytes_448;
  _93 = (long int) _92;
  _94 = gen_rtx_CONST_INT (0, _93);

IPA CP knows

    callsite  ix86_expand_prologue/1286343 -> gen_rtx_CONST_INT/244924 :
       param 0: CONST: 0
         value: 0x0, mask: 0x0
         Unknown VR
       param 1: UNKNOWN
         value: 0x0, mask:
0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
         VR  [-536870911, -5]

    callsite  ix86_expand_prologue/1286343 -> gen_rtx_CONST_INT/244924 :
       param 0: CONST: 0
         value: 0x0, mask: 0x0
         Unknown VR
       param 1: UNKNOWN
         value: 0x0, mask:
0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
         VR  [-536870911, 0]

and it at least creates a constprop clone for VOIDmode.

Considering gen_rtx_CONST_INT.constprop/2274667 with 38 size
 to be inlined into ix86_expand_prologue/1286343 in unknown:-1
 Estimated badness is -0.000000, frequency 0.12.
    Badness calculation for ix86_expand_prologue/1286343 ->
gen_rtx_CONST_INT.constprop/2274667
      size growth 2, time 4.533600 unspec 7.533600 IPA hints: cross_module
      -0.000000: guessed profile. frequency 0.122200, count -1 caller count -1
time saved 1.955200 overall growth 62692 (current) 39603 (original) 104883
(compensated)
      Adjusted by hints -0.000000
  Parm map:  -5 -5


I'm somewhat lost as to where to look for why that unreachable () is created.
It looks like the inliner redirects things this way.

  parent reply	other threads:[~2023-03-01 12:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-01 10:25 [Bug target/108984] New: " rguenth at gcc dot gnu.org
2023-03-01 10:44 ` [Bug target/108984] " rguenth at gcc dot gnu.org
2023-03-01 12:14 ` rguenth at gcc dot gnu.org [this message]
2023-03-01 12:21 ` jakub at gcc dot gnu.org
2023-03-01 13:05 ` rguenth at gcc dot gnu.org
2023-03-01 13:23 ` rguenth at gcc dot gnu.org
2023-03-01 13:34 ` rguenth at gcc dot gnu.org
2023-03-01 13:45 ` jakub at gcc dot gnu.org
2023-03-01 14:01 ` rguenth at gcc dot gnu.org
2023-03-02  7:25 ` 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-108984-4-Bimk9Yty30@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).