public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/114883] New: 521.wrf_r ICE with -O2 -march=sapphirerapids -fvect-cost-model=cheap
@ 2024-04-29 4:42 liuhongt at gcc dot gnu.org
2024-04-29 4:44 ` [Bug tree-optimization/114883] [14 Regression] " pinskia at gcc dot gnu.org
` (13 more replies)
0 siblings, 14 replies; 15+ messages in thread
From: liuhongt at gcc dot gnu.org @ 2024-04-29 4:42 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/114883] [14 Regression] 521.wrf_r ICE with -O2 -march=sapphirerapids -fvect-cost-model=cheap
2024-04-29 4:42 [Bug tree-optimization/114883] New: 521.wrf_r ICE with -O2 -march=sapphirerapids -fvect-cost-model=cheap liuhongt at gcc dot gnu.org
@ 2024-04-29 4:44 ` pinskia at gcc dot gnu.org
2024-04-29 4:45 ` [Bug tree-optimization/114883] [14/15 " pinskia at gcc dot gnu.org
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-29 4:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114883
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|521.wrf_r ICE with -O2 |[14 Regression] 521.wrf_r
|-march=sapphirerapids |ICE with -O2
|-fvect-cost-model=cheap |-march=sapphirerapids
| |-fvect-cost-model=cheap
Keywords| |ice-on-valid-code
Target Milestone|--- |14.0
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/114883] [14/15 Regression] 521.wrf_r ICE with -O2 -march=sapphirerapids -fvect-cost-model=cheap
2024-04-29 4:42 [Bug tree-optimization/114883] New: 521.wrf_r ICE with -O2 -march=sapphirerapids -fvect-cost-model=cheap 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 ` pinskia at gcc dot gnu.org
2024-04-29 4:52 ` liuhongt at gcc dot gnu.org
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-29 4:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114883
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Can you reduce the fortran code down for the ICE? It should not be hard, you
can use delta even.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/114883] [14/15 Regression] 521.wrf_r ICE with -O2 -march=sapphirerapids -fvect-cost-model=cheap
2024-04-29 4:42 [Bug tree-optimization/114883] New: 521.wrf_r ICE with -O2 -march=sapphirerapids -fvect-cost-model=cheap 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
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: liuhongt at gcc dot gnu.org @ 2024-04-29 4:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114883
--- Comment #2 from Hongtao Liu <liuhongt at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> Can you reduce the fortran code down for the ICE? It should not be hard, you
> can use delta even.
Let me try.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/114883] [14/15 Regression] 521.wrf_r ICE with -O2 -march=sapphirerapids -fvect-cost-model=cheap
2024-04-29 4:42 [Bug tree-optimization/114883] New: 521.wrf_r ICE with -O2 -march=sapphirerapids -fvect-cost-model=cheap liuhongt at gcc dot gnu.org
` (2 preceding siblings ...)
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
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: liuhongt at gcc dot gnu.org @ 2024-04-29 5:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114883
--- Comment #3 from Hongtao Liu <liuhongt at gcc dot gnu.org> ---
Created attachment 58066
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58066&action=edit
reproduced testcase
gfortran -O2 -march=x86-64-v4 -fvect-cost-model=cheap.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/114883] [14/15 Regression] 521.wrf_r ICE with -O2 -march=sapphirerapids -fvect-cost-model=cheap
2024-04-29 4:42 [Bug tree-optimization/114883] New: 521.wrf_r ICE with -O2 -march=sapphirerapids -fvect-cost-model=cheap liuhongt at gcc dot gnu.org
` (3 preceding siblings ...)
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
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: liuhongt at gcc dot gnu.org @ 2024-04-29 8:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114883
--- Comment #4 from Hongtao Liu <liuhongt at gcc dot gnu.org> ---
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.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/114883] [14/15 Regression] 521.wrf_r ICE with -O2 -march=sapphirerapids -fvect-cost-model=cheap
2024-04-29 4:42 [Bug tree-optimization/114883] New: 521.wrf_r ICE with -O2 -march=sapphirerapids -fvect-cost-model=cheap liuhongt at gcc dot gnu.org
` (4 preceding siblings ...)
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
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: liuhongt at gcc dot gnu.org @ 2024-04-29 8:52 UTC (permalink / raw)
To: gcc-bugs
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);
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/114883] [14/15 Regression] 521.wrf_r ICE with -O2 -march=sapphirerapids -fvect-cost-model=cheap
2024-04-29 4:42 [Bug tree-optimization/114883] New: 521.wrf_r ICE with -O2 -march=sapphirerapids -fvect-cost-model=cheap liuhongt at gcc dot gnu.org
` (5 preceding siblings ...)
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
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-04-29 17:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114883
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #6 from Jakub Jelinek <jakub 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.
Why IFN_COND_MIN and not IFN_COND_MAX?
What about other binary cond_fns? I see
DIV/MOD/RDIV/COPYSIGN/FMIN/FMAX/SHL/SHR.
Though, SHL/SHR/COPYSIGN/DIV/MOD/RDIV aren't commutative nor associative, dunno
about
if FMIN/FMAX could trigger. But certainly IFN_COND_MAX should be handled next
to IFN_COND_MIN.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/114883] [14/15 Regression] 521.wrf_r ICE with -O2 -march=sapphirerapids -fvect-cost-model=cheap
2024-04-29 4:42 [Bug tree-optimization/114883] New: 521.wrf_r ICE with -O2 -march=sapphirerapids -fvect-cost-model=cheap liuhongt at gcc dot gnu.org
` (6 preceding siblings ...)
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
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-04-29 17:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114883
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Slightly more reduced testcase:
subroutine pr114883(a, b, c, d, e, f, g, h, o)
real(8) :: c(1011), d(1011), e(0:1011)
real(8) :: p, q, f, r, g(1011), h(1011), b, bar
integer :: o(100), a, t, u
p = 0.0_8
r = bar()
u = 1
do i = 1,a
do k = 1,1011
km1 = max0(k-1,1)
h(k) = c(k) * e(k-1) * d(km1)
f = g(k) + h(k)
if(f.gt.1.e-6)then
p = min(p,r)
endif
end do
q = 0.9_8 * p
t = integer(b/q + 1)
if(t>100)then
u = t
endif
o(u) = o(u) + 1
end do
end subroutine pr114883
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/114883] [14/15 Regression] 521.wrf_r ICE with -O2 -march=sapphirerapids -fvect-cost-model=cheap
2024-04-29 4:42 [Bug tree-optimization/114883] New: 521.wrf_r ICE with -O2 -march=sapphirerapids -fvect-cost-model=cheap liuhongt at gcc dot gnu.org
` (7 preceding siblings ...)
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
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-04-29 17:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114883
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Just changing the min in the testcase to max results on ICE with IFN_COND_MAX.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/114883] [14/15 Regression] 521.wrf_r ICE with -O2 -march=sapphirerapids -fvect-cost-model=cheap
2024-04-29 4:42 [Bug tree-optimization/114883] New: 521.wrf_r ICE with -O2 -march=sapphirerapids -fvect-cost-model=cheap liuhongt at gcc dot gnu.org
` (8 preceding siblings ...)
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
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-04-29 18:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114883
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 58073
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58073&action=edit
gcc14-pr114883.patch
Full untested patch.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/114883] [14/15 Regression] 521.wrf_r ICE with -O2 -march=sapphirerapids -fvect-cost-model=cheap
2024-04-29 4:42 [Bug tree-optimization/114883] New: 521.wrf_r ICE with -O2 -march=sapphirerapids -fvect-cost-model=cheap liuhongt at gcc dot gnu.org
` (9 preceding siblings ...)
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
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: liuhongt at gcc dot gnu.org @ 2024-04-30 0:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114883
--- Comment #10 from Hongtao Liu <liuhongt at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #9)
> Created attachment 58073 [details]
> gcc14-pr114883.patch
>
> Full untested patch.
This will fix 521.wrf_r ICE, and pass runtime validation.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/114883] [14/15 Regression] 521.wrf_r ICE with -O2 -march=sapphirerapids -fvect-cost-model=cheap
2024-04-29 4:42 [Bug tree-optimization/114883] New: 521.wrf_r ICE with -O2 -march=sapphirerapids -fvect-cost-model=cheap liuhongt at gcc dot gnu.org
` (10 preceding siblings ...)
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
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-04-30 8:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114883
--- Comment #11 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:04ef92a62af3a815b86a2037267cd4e747ae225c
commit r15-64-g04ef92a62af3a815b86a2037267cd4e747ae225c
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Apr 30 10:11:47 2024 +0200
vect: Adjust vect_transform_reduction assertion [PR114883]
The assertion doesn't allow IFN_COND_MIN/IFN_COND_MAX, which are
commutative conditional binary operations like ADD/MUL/AND/IOR/XOR,
and can be handled just fine.
In particular, we emit
vminpd %zmm3, %zmm5, %zmm0{%k2}
vminpd %zmm0, %zmm3, %zmm5{%k1}
and
vmaxpd %zmm3, %zmm5, %zmm0{%k2}
vmaxpd %zmm0, %zmm3, %zmm5{%k1}
in the vectorized loops of the first and second subroutine.
2024-04-30 Jakub Jelinek <jakub@redhat.com>
Hongtao Liu <hongtao.liu@intel.com>
PR tree-optimization/114883
* tree-vect-loop.cc (vect_transform_reduction): Allow IFN_COND_MIN
and
IFN_COND_MAX in the assert.
* gfortran.dg/pr114883.f90: New test.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/114883] [14/15 Regression] 521.wrf_r ICE with -O2 -march=sapphirerapids -fvect-cost-model=cheap
2024-04-29 4:42 [Bug tree-optimization/114883] New: 521.wrf_r ICE with -O2 -march=sapphirerapids -fvect-cost-model=cheap liuhongt at gcc dot gnu.org
` (11 preceding siblings ...)
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
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-04-30 8:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114883
--- Comment #12 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:a795a7b67027bc976a353b5fa927ac8c5f29347d
commit r14-10152-ga795a7b67027bc976a353b5fa927ac8c5f29347d
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Apr 30 10:11:47 2024 +0200
vect: Adjust vect_transform_reduction assertion [PR114883]
The assertion doesn't allow IFN_COND_MIN/IFN_COND_MAX, which are
commutative conditional binary operations like ADD/MUL/AND/IOR/XOR,
and can be handled just fine.
In particular, we emit
vminpd %zmm3, %zmm5, %zmm0{%k2}
vminpd %zmm0, %zmm3, %zmm5{%k1}
and
vmaxpd %zmm3, %zmm5, %zmm0{%k2}
vmaxpd %zmm0, %zmm3, %zmm5{%k1}
in the vectorized loops of the first and second subroutine.
2024-04-30 Jakub Jelinek <jakub@redhat.com>
Hongtao Liu <hongtao.liu@intel.com>
PR tree-optimization/114883
* tree-vect-loop.cc (vect_transform_reduction): Allow IFN_COND_MIN
and
IFN_COND_MAX in the assert.
* gfortran.dg/pr114883.f90: New test.
(cherry picked from commit 04ef92a62af3a815b86a2037267cd4e747ae225c)
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/114883] [14/15 Regression] 521.wrf_r ICE with -O2 -march=sapphirerapids -fvect-cost-model=cheap
2024-04-29 4:42 [Bug tree-optimization/114883] New: 521.wrf_r ICE with -O2 -march=sapphirerapids -fvect-cost-model=cheap liuhongt at gcc dot gnu.org
` (12 preceding siblings ...)
2024-04-30 8:16 ` cvs-commit at gcc dot gnu.org
@ 2024-04-30 8:16 ` jakub at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-04-30 8:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114883
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2024-04-30 8:16 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-29 4:42 [Bug tree-optimization/114883] New: 521.wrf_r ICE with -O2 -march=sapphirerapids -fvect-cost-model=cheap 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
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
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).