public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "liuhongt at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/114883] [14/15 Regression] 521.wrf_r ICE with -O2 -march=sapphirerapids -fvect-cost-model=cheap
Date: Mon, 29 Apr 2024 08:52:35 +0000	[thread overview]
Message-ID: <bug-114883-4-r4S5YPCbxC@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-114883-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #5 from Hongtao Liu <liuhongt at gcc dot gnu.org> ---

(In reply to Hongtao Liu from comment #4)
> diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
> index a6cf0a5546c..ae6abe00f3e 100644
> --- a/gcc/tree-vect-loop.cc
> +++ b/gcc/tree-vect-loop.cc
> @@ -8505,7 +8505,8 @@ vect_transform_reduction (loop_vec_info loop_vinfo,
>      {
>        gcc_assert (code == IFN_COND_ADD || code == IFN_COND_SUB
>                   || code == IFN_COND_MUL || code == IFN_COND_AND
> -                 || code == IFN_COND_IOR || code == IFN_COND_XOR);
> +                 || code == IFN_COND_IOR || code == IFN_COND_XOR
> +                 || code == IFN_COND_MIN);
>        gcc_assert (op.num_ops == 4
>                   && (op.ops[reduc_index]
>                       == op.ops[internal_fn_else_index ((internal_fn)
> code)]));
> 
> Could fix the ICE.

Generate code as:

74  vect__38.89_332 = {_289, _295, _301, _307, _313, _319, _325, _331};
475  vect__39.90_333 = vect__36.85_228 * vect__38.88_283;
476  vect__39.90_334 = vect__36.85_229 * vect__38.89_332;
477  vect_tinv_80.91_335 = .FMA (vect__33.78_194, vect__32.75_211,
vect__39.90_333);
478  vect_tinv_80.91_336 = .FMA (vect__33.79_107, vect__32.75_207,
vect__39.90_334);
479  mask__217.92_338 = vect_tinv_80.91_335 > {
9.999999974752427078783512115478515625e-7,
9.999999974752427078783512115478515625e-7,
9.999999974752427078783512115478515625e-7, 9.999999974752\
   427078783512115478515625e-7, 9.999999974752427078783512115478515625e-7,
9.999999974752427078783512115478515625e-7,
9.999999974752427078783512115478515625e-7, 9.9999999747524270787835121154\
   78515625e-7 };
480  mask__217.92_339 = vect_tinv_80.91_336 > {
9.999999974752427078783512115478515625e-7,
9.999999974752427078783512115478515625e-7,
9.999999974752427078783512115478515625e-7, 9.999999974752\
   427078783512115478515625e-7, 9.999999974752427078783512115478515625e-7,
9.999999974752427078783512115478515625e-7,
9.999999974752427078783512115478515625e-7, 9.9999999747524270787835121154\
   78515625e-7 };
481  vect_dtt_84.93_342 = .COND_RDIV (mask__217.92_338, { 1.0e+0, 1.0e+0,
1.0e+0, 1.0e+0, 1.0e+0, 1.0e+0, 1.0e+0, 1.0e+0 }, vect_tinv_80.91_335, { 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 });
482  vect_dtt_84.93_343 = .COND_RDIV (mask__217.92_339, { 1.0e+0, 1.0e+0,
1.0e+0, 1.0e+0, 1.0e+0, 1.0e+0, 1.0e+0, 1.0e+0 }, vect_tinv_80.91_336, { 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 });
483  vect_M.94_344 = .COND_MIN (mask__217.92_338, vect_dtmin_119.64_128,
vect_dtt_84.93_342, vect_dtt_84.93_342);
484  vect_M.94_345 = .COND_MIN (mask__217.92_339, vect_dtt_84.93_343,
vect_M.94_344, vect_dtt_84.93_343);
485  ivtmp.102_164 = ivtmp.102_119 + 128;
486  ivtmp.105_196 = ivtmp.105_193 + 128;
487  ivtmp.109_136 = ivtmp.109_177 + 128;
488  if (_118 == ivtmp.102_164)
489    goto <bb 13>; [36.35%]
490  else
491    goto <bb 12>; [63.65%]
492
493  <bb 13> [local count: 54066899]:
494  _347 = .REDUC_MIN (vect_M.94_345);

  parent reply	other threads:[~2024-04-29  8:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-29  4:42 [Bug tree-optimization/114883] New: " liuhongt at gcc dot gnu.org
2024-04-29  4:44 ` [Bug tree-optimization/114883] [14 Regression] " pinskia at gcc dot gnu.org
2024-04-29  4:45 ` [Bug tree-optimization/114883] [14/15 " pinskia at gcc dot gnu.org
2024-04-29  4:52 ` liuhongt at gcc dot gnu.org
2024-04-29  5:44 ` liuhongt at gcc dot gnu.org
2024-04-29  8:44 ` liuhongt at gcc dot gnu.org
2024-04-29  8:52 ` liuhongt at gcc dot gnu.org [this message]
2024-04-29 17:18 ` jakub at gcc dot gnu.org
2024-04-29 17:41 ` jakub at gcc dot gnu.org
2024-04-29 17:50 ` jakub at gcc dot gnu.org
2024-04-29 18:44 ` jakub at gcc dot gnu.org
2024-04-30  0:43 ` liuhongt at gcc dot gnu.org
2024-04-30  8:12 ` cvs-commit at gcc dot gnu.org
2024-04-30  8:16 ` cvs-commit at gcc dot gnu.org
2024-04-30  8:16 ` jakub 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-114883-4-r4S5YPCbxC@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).