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] New: 521.wrf_r ICE with -O2 -march=sapphirerapids -fvect-cost-model=cheap
Date: Mon, 29 Apr 2024 04:42:13 +0000	[thread overview]
Message-ID: <bug-114883-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 114883
           Summary: 521.wrf_r ICE with -O2 -march=sapphirerapids
                    -fvect-cost-model=cheap
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: liuhongt at gcc dot gnu.org
  Target Milestone: ---

during GIMPLE pass: vect
dump file: module_cam_mp_ndrop.fppized.f90.179t.vect
module_cam_mp_ndrop.fppized.f90:33:27:

   33 |       subroutine dropmixnuc(lchnk, ncol, ncldwtr,tendnd, temp,omega,  &
      |                           ^
internal compiler error: in vect_transform_reduction, at tree-vect-loop.cc:8506
0x8c8009 vect_transform_reduction(_loop_vec_info*, _stmt_vec_info*,
gimple_stmt_iterator*, gimple**, _slp_tree*)
        /iusers/liuhongt/work/gcc-14/gcc/tree-vect-loop.cc:8506
0x2959895 vect_transform_stmt(vec_info*, _stmt_vec_info*,
gimple_stmt_iterator*, _slp_tree*, _slp_instance*)
        /iusers/liuhongt/work/gcc-14/gcc/tree-vect-stmts.cc:13447
0x185a31a vect_transform_loop_stmt
        /iusers/liuhongt/work/gcc-14/gcc/tree-vect-loop.cc:11561
0x18794e2 vect_transform_loop(_loop_vec_info*, gimple*)
        /iusers/liuhongt/work/gcc-14/gcc/tree-vect-loop.cc:12087
0x18c3544 vect_transform_loops
        /iusers/liuhongt/work/gcc-14/gcc/tree-vectorizer.cc:1006
0x18c3bc3 try_vectorize_loop_1
        /iusers/liuhongt/work/gcc-14/gcc/tree-vectorizer.cc:1152
0x18c3bc3 try_vectorize_loop
        /iusers/liuhongt/work/gcc-14/gcc/tree-vectorizer.cc:1182
0x18c4224 execute
        /iusers/liuhongt/work/gcc-14/gcc/tree-vectorizer.cc:1298
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.


vect dump, vectorization for reduction of COND_MIN and ICE.

 9014  MEM <vector(4) real(kind=8)> [(real(kind=8) *)vectp.2627_3771] =
vect__458.2626_3767;
 9015  vect_tinv_1357.2629_3773 = vect__453.2615_3744 + vect__458.2626_3766;
 9016  vect_tinv_1357.2629_3774 = vect__453.2615_3745 + vect__458.2626_3767;
 9017  tinv_1357 = _453 + _458;
 9018  mask__2039.2630_3776 = vect_vec_iv_.2598_3718 == vect_cst__3775;
 9019  _2039 = k.864_1980 == prephitmp_3150;
 9020  mask_patt_3658.2631_3777 = [vec_unpack_lo_expr] mask__2039.2630_3776;
 9021  mask_patt_3658.2631_3778 = [vec_unpack_hi_expr] mask__2039.2630_3776;
 9022  vect_patt_3659.2632_3781 = .COND_ADD (mask_patt_3658.2631_3777,
vect_tinv_1357.2629_3773, vect_cst__3779, vect_cst__3780);
 9023  vect_patt_3659.2632_3782 = .COND_ADD (mask_patt_3658.2631_3778,
vect_tinv_1357.2629_3774, vect_cst__3779, vect_cst__3780);
 9024  tinv_1766 = 0.0;
 9025  mask_patt_3660.2633_3783 = [vec_unpack_lo_expr] mask__2039.2630_3776;
 9026  mask_patt_3660.2633_3784 = [vec_unpack_hi_expr] mask__2039.2630_3776;
 9027  vect_patt_3661.2634_3786 = .COND_ADD (mask_patt_3660.2633_3783,
vect_patt_3659.2632_3781, vect_cst__3785, vect_tinv_1357.2629_3773);
 9028  vect_patt_3661.2634_3787 = .COND_ADD (mask_patt_3660.2633_3784,
vect_patt_3659.2632_3782, vect_cst__3785, vect_tinv_1357.2629_3774);
 9029  tinv_1359 = 0.0;
 9030  mask__2017.2635_3789 = vect_patt_3661.2634_3786 > vect_cst__3788;
 9031  mask__2017.2635_3790 = vect_patt_3661.2634_3787 > vect_cst__3788;
 9032  _2017 = tinv_1359 > 9.999999974752427078783512115478515625e-7;
 9033  vect_dtt_1360.2636_3793 = .COND_RDIV (mask__2017.2635_3789,
vect_cst__3791, vect_patt_3661.2634_3786, vect_cst__3792);
 9034  vect_dtt_1360.2636_3794 = .COND_RDIV (mask__2017.2635_3790,
vect_cst__3791, vect_patt_3661.2634_3787, vect_cst__3792);
 9035  dtt_1360 = 0.0;
 9036  M.287_1361 = .COND_MIN (_2017, dtt_1360, dtmin_1992, dtmin_1992);
 9037  _459 = k.864_1980 + 1;
 9038  vectp.2602_3727 = vectp.2602_3729 + 32;
 9039  vectp.2606_3733 = vectp.2606_3735 + 32;
 9040  vectp.2611_3740 = vectp.2611_3742 + 32;
 9041  vectp.2616_3747 = vectp.2616_3749 + 32;
 9042  vectp.2618_3752 = vectp.2618_3754 + 32;
 9043  vectp.2627_3769 = vectp.2627_3771 + 32;
 9044  if (_459 > prephitmp_3150)
 9045    goto <bb 561>; [11.00%]
 9046  else
 9047    goto <bb 298>; [89.00%]
 9048


Part of source code in  module_cam_mp_ndrop.fppized.f90, the ICE loop.

 630         do k=1,pver
 631            km1=max0(k-1,1)
 632            ekkp(k)=zn(k)*ekk(k)*zs(k)
 633            ekkm(k)=zn(k)*ekk(k-1)*zs(km1)
 634            tinv=ekkp(k)+ekkm(k)
 635
 636            if(k.eq.pver)tinv=tinv+surfratemax
 637! rce-comment -- tinv is the sum of all first-order-loss-rates
 638!    for the layer.  for most layers, the activation loss rate
 639!    (for interstitial particles) is accounted for by the loss by
 640!    turb-transfer to the layer above.
 641!    k=pver is special, and the loss rate for activation within
 642!    the layer must be added to tinv.  if not, the time step
 643!    can be too big, and explmix can produce negative values.
 644!    the negative values are reset to zero, resulting in an
 645!    artificial source.
 646            if(k.eq.pver)tinv=tinv+taumix_internal_pver_inv
 647
 648            if(tinv.gt.1.e-6)then
 649               dtt=1./tinv
 650               dtmin=min(dtmin,dtt)
 651            endif
 652         enddo

             reply	other threads:[~2024-04-29  4:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-29  4:42 liuhongt at gcc dot gnu.org [this message]
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
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@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).