public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/110278] New: [14 Regression] FAIL: gcc.dg/tree-ssa/pr103257-1.c scan-tree-dump-times optimized "link_error" 0 from r14-1880-g827e208fa64771
@ 2023-06-16  8:31 rguenth at gcc dot gnu.org
  2023-06-16  8:32 ` [Bug tree-optimization/110278] " rguenth at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-06-16  8:31 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110278
           Summary: [14 Regression] FAIL: gcc.dg/tree-ssa/pr103257-1.c
                    scan-tree-dump-times optimized "link_error" 0 from
                    r14-1880-g827e208fa64771
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

r14-1880-g827e208fa64771 causes

FAIL: gcc.dg/tree-ssa/pr103257-1.c scan-tree-dump-times optimized "link_error"
0

because we now fold more in .original:

-  if (a ((unsigned int) ((0, 1) && b != 0) > b, (int) (short int) c) != 0)
+  if (a ((unsigned int) (b != 0) > b, (int) (short int) c) != 0)

the call to link_error was optimized away in threadfull1 before this change,
after the change code is straight-line and no jump threading opportunity
is realized.

Before we enter threadfull1 with

  <bb 2> [local count: 1073741824]:
  c.0_1 = c;
  b.2_2 = b;
  if (b.2_2 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 3>; [50.00%]

  <bb 3> [local count: 536870913]:

  <bb 4> [local count: 1073741824]:
  # iftmp.1_5 = PHI <1(2), 0(3)>
  iftmp.3_3 = (unsigned int) iftmp.1_5;
  _4 = b.2_2 < iftmp.3_3;
  e.5_10 = (unsigned short) _4;
  f.6_11 = (unsigned short) c.0_1;
  _12 = e.5_10 * f.6_11;
  if (_12 != 0)
    goto <bb 5>; [33.00%]
  else
    goto <bb 6>; [67.00%]

  <bb 5> [local count: 354334800]:
  link_error ();

  <bb 6> [local count: 1073741824]:
  c = 0;
  return 0;

but afterwards the b != 0 condition is in straight-line code:

  <bb 2> [local count: 1073741824]:
  c.0_1 = c;
  b.1_2 = b;
  _3 = b.1_2 != 0;
  _4 = (unsigned int) _3;
  _5 = b.1_2 < _4;
  e.3_10 = (unsigned short) _5;
  f.4_11 = (unsigned short) c.0_1;
  _12 = e.3_10 * f.4_11;
  if (_12 != 0)
    goto <bb 3>; [33.00%]
  else
    goto <bb 4>; [67.00%]

  <bb 3> [local count: 354334800]:
  link_error ();

  <bb 4> [local count: 1073741824]:
  c = 0;
  return 0;

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-06-16 11:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-16  8:31 [Bug tree-optimization/110278] New: [14 Regression] FAIL: gcc.dg/tree-ssa/pr103257-1.c scan-tree-dump-times optimized "link_error" 0 from r14-1880-g827e208fa64771 rguenth at gcc dot gnu.org
2023-06-16  8:32 ` [Bug tree-optimization/110278] " rguenth at gcc dot gnu.org
2023-06-16  9:26 ` rguenth at gcc dot gnu.org
2023-06-16  9:47 ` rguenth at gcc dot gnu.org
2023-06-16  9:49 ` rguenth at gcc dot gnu.org
2023-06-16 11:46 ` cvs-commit at gcc dot gnu.org
2023-06-16 11:46 ` rguenth at gcc dot gnu.org

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).