public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "luoxhu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/103802] [12 regression] recip-3.c fails after r12-6087 on Power m32
Date: Mon, 27 Dec 2021 02:42:48 +0000	[thread overview]
Message-ID: <bug-103802-4-1AorrBN19p@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-103802-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #1 from luoxhu at gcc dot gnu.org ---
MOVE_MAX_PIECES is 4 on m32 but it is 8 on m64, then estimate_move_cost is
different between them 2 vs 1 for “((size + MOVE_MAX_PIECES - 1) /
MOVE_MAX_PIECES)".

recip-3.m32.c.172t.cunroll:

 BB: 11, after_exit: 0
 BB: 7, after_exit: 0
  size:   2 _4 = F[i_23];
  size:   1 _5 = _4 + iftmp.1_10;
  size:   2 F[i_23] = _5;
 BB: 5, after_exit: 0
  size:   1 _2 = d_14 +
1.00000000000000088817841970012523233890533447265625e-1;
  size:   1 reciptmp_12 = 1.0e+0 / d_14;
  size:   1 iftmp.1_18 = reciptmp_12 * _2;
 BB: 6, after_exit: 0
  size:   1 _3 = -1.00000000000000088817841970012523233890533447265625e-1 -
d_14;
  size:   1 reciptmp_25 = 1.0e+0 / d_14;
  size:   1 iftmp.1_17 = reciptmp_25 * _3;
 BB: 4, after_exit: 0
  size:   2 if (e.0_1 <
-5.00000000000000444089209850062616169452667236328125e-2)
size: 19-4, last_iteration: 19-4
  Loop size: 19
  Estimated size after unrolling: 20
Not unrolling loop 1: size would grow.


But recip-3.m64.c.172t.cunroll:

 BB: 11, after_exit: 0
 BB: 7, after_exit: 0
  size:   1 _4 = F[i_23];
  size:   1 _5 = _4 + iftmp.1_10;
  size:   1 F[i_23] = _5;
 BB: 5, after_exit: 0
  size:   1 _2 = d_14 +
1.00000000000000088817841970012523233890533447265625e-1;
  size:   1 reciptmp_12 = 1.0e+0 / d_14;
  size:   1 iftmp.1_18 = reciptmp_12 * _2;
 BB: 6, after_exit: 0
  size:   1 _3 = -1.00000000000000088817841970012523233890533447265625e-1 -
d_14;
  size:   1 reciptmp_25 = 1.0e+0 / d_14;
  size:   1 iftmp.1_17 = reciptmp_25 * _3;
 BB: 4, after_exit: 0
  size:   2 if (e.0_1 <
-5.00000000000000444089209850062616169452667236328125e-2)
size: 17-4, last_iteration: 17-4
  Loop size: 17
  Estimated size after unrolling: 17
Making edge 18->9 impossible by redistributing probability to other edges.
Making edge 8->10 impossible by redistributing probability to other edges.
/home/luoxhu/workspace/gcc-master/gcc/testsuite/gcc.dg/tree-ssa/recip-3.c:16:14:
optimized: loop with 1 iterations completely unrolled (header execution count
357878154)

  parent reply	other threads:[~2021-12-27  2:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-22  8:56 [Bug middle-end/103802] New: " luoxhu at gcc dot gnu.org
2021-12-22  9:06 ` [Bug middle-end/103802] " pinskia at gcc dot gnu.org
2021-12-27  2:42 ` luoxhu at gcc dot gnu.org [this message]
2021-12-27  3:03 ` [Bug tree-optimization/103802] " luoxhu at gcc dot gnu.org
2021-12-28 19:02 ` jakub at gcc dot gnu.org
2021-12-29  2:29 ` luoxhu at gcc dot gnu.org
2022-01-03 12:11 ` rguenth at gcc dot gnu.org
2022-01-07  7:40 ` luoxhu at gcc dot gnu.org
2022-01-10  9:24 ` rguenther at suse dot de
2022-01-11  8:37 ` luoxhu 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-103802-4-1AorrBN19p@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).