public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/113967] New: [14 Regression] ICE: in exact_div, at poly-int.h:2156 with -O -mavx512f
@ 2024-02-17 9:05 zsojka at seznam dot cz
2024-02-17 9:18 ` [Bug tree-optimization/113967] " pinskia at gcc dot gnu.org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: zsojka at seznam dot cz @ 2024-02-17 9:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113967
Bug ID: 113967
Summary: [14 Regression] ICE: in exact_div, at poly-int.h:2156
with -O -mavx512f
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: zsojka at seznam dot cz
Target Milestone: ---
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Created attachment 57445
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57445&action=edit
reduced testcase
Compiler output:
$ x86_64-pc-linux-gnu-gcc -O -mavx512f testcase.c
during GIMPLE pass: forwprop
testcase.c: In function 'bar3':
testcase.c:25:1: internal compiler error: in exact_div, at poly-int.h:2156
25 | }
| ^
0x8f2762 poly_int<1u, poly_result<unsigned long, if_nonpoly<unsigned long,
unsigned long, poly_int_traits<unsigned long>::is_poly>::type,
poly_coeff_pair_traits<unsigned long, if_nonpoly<unsigned long, unsigned long,
poly_int_traits<unsigned long>::is_poly>::type>::result_kind>::type>
exact_div<1u, unsigned long, unsigned long>(poly_int<1u, unsigned long> const&,
unsigned long)
/repo/gcc-trunk/gcc/poly-int.h:2156
0x8f2762 poly_int<1u, poly_result<unsigned long, if_nonpoly<unsigned long,
unsigned long, poly_int_traits<unsigned long>::is_poly>::type,
poly_coeff_pair_traits<unsigned long, if_nonpoly<unsigned long, unsigned long,
poly_int_traits<unsigned long>::is_poly>::type>::result_kind>::type>
exact_div<1u, unsigned long, unsigned long>(poly_int<1u, unsigned long> const&,
unsigned long)
/repo/gcc-trunk/gcc/poly-int.h:2150
0x8f2762 gimple_simplify_BIT_INSERT_EXPR(gimple_match_op*, gimple**, tree_node*
(*)(tree_node*), code_helper, tree_node*, tree_node*, tree_node*, tree_node*)
/repo/build-gcc-trunk-amd64/gcc/gimple-match-5.cc:16981
0x1cd5853 gimple_resimplify3
/repo/gcc-trunk/gcc/gimple-match-exports.cc:1107
0x1cd6a12 gimple_simplify(gimple*, gimple_match_op*, gimple**, tree_node*
(*)(tree_node*), tree_node* (*)(tree_node*))
/repo/gcc-trunk/gcc/gimple-match-exports.cc:898
0x116c817 fold_stmt_1
/repo/gcc-trunk/gcc/gimple-fold.cc:6359
0x166c5d5 execute
/repo/gcc-trunk/gcc/tree-ssa-forwprop.cc:3950
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.
$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r14-9043-20240217001708-gd70f155b074-checking-yes-rtl-df-extra-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/14.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--with-cloog --with-ppl --with-isl --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
--with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r14-9043-20240217001708-gd70f155b074-checking-yes-rtl-df-extra-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240217 (experimental) (GCC)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/113967] [14 Regression] ICE: in exact_div, at poly-int.h:2156 with -O -mavx512f
2024-02-17 9:05 [Bug tree-optimization/113967] New: [14 Regression] ICE: in exact_div, at poly-int.h:2156 with -O -mavx512f zsojka at seznam dot cz
@ 2024-02-17 9:18 ` pinskia at gcc dot gnu.org
2024-02-17 9:22 ` pinskia at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-17 9:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113967
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |14.0
CC| |pinskia at gcc dot gnu.org
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/113967] [14 Regression] ICE: in exact_div, at poly-int.h:2156 with -O -mavx512f
2024-02-17 9:05 [Bug tree-optimization/113967] New: [14 Regression] ICE: in exact_div, at poly-int.h:2156 with -O -mavx512f zsojka at seznam dot cz
2024-02-17 9:18 ` [Bug tree-optimization/113967] " pinskia at gcc dot gnu.org
@ 2024-02-17 9:22 ` pinskia at gcc dot gnu.org
2024-02-17 10:20 ` pinskia at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-17 9:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113967
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Most likely r14-3381-g27de9aa152141e ...
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/113967] [14 Regression] ICE: in exact_div, at poly-int.h:2156 with -O -mavx512f
2024-02-17 9:05 [Bug tree-optimization/113967] New: [14 Regression] ICE: in exact_div, at poly-int.h:2156 with -O -mavx512f zsojka at seznam dot cz
2024-02-17 9:18 ` [Bug tree-optimization/113967] " pinskia at gcc dot gnu.org
2024-02-17 9:22 ` pinskia at gcc dot gnu.org
@ 2024-02-17 10:20 ` pinskia at gcc dot gnu.org
2024-02-17 10:28 ` [Bug tree-optimization/113967] [14 Regression] ICE: in exact_div, at poly-int.h:2156 with -O -mavx512f since r14-3381 jakub at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-17 10:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113967
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2024-02-17
Status|UNCONFIRMED |NEW
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reduced testcase that fails on most (all) targets even:
```
typedef unsigned short W __attribute__((__vector_size__ (8)));
void
bar3 (W *x1)
{
W x = *x1;
W y = {};
__builtin_memmove (&y, 1 + (char *) &x, 2);
*x1 = y;
}
```
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/113967] [14 Regression] ICE: in exact_div, at poly-int.h:2156 with -O -mavx512f since r14-3381
2024-02-17 9:05 [Bug tree-optimization/113967] New: [14 Regression] ICE: in exact_div, at poly-int.h:2156 with -O -mavx512f zsojka at seznam dot cz
` (2 preceding siblings ...)
2024-02-17 10:20 ` pinskia at gcc dot gnu.org
@ 2024-02-17 10:28 ` jakub at gcc dot gnu.org
2024-02-17 11:05 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-02-17 10:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113967
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[14 Regression] ICE: in |[14 Regression] ICE: in
|exact_div, at |exact_div, at
|poly-int.h:2156 with -O |poly-int.h:2156 with -O
|-mavx512f |-mavx512f since r14-3381
Priority|P3 |P1
CC| |jakub at gcc dot gnu.org
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r14-3381-g27de9aa152141e7f3ee66372647d0f2cd94c4b90 (at least #c2).
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/113967] [14 Regression] ICE: in exact_div, at poly-int.h:2156 with -O -mavx512f since r14-3381
2024-02-17 9:05 [Bug tree-optimization/113967] New: [14 Regression] ICE: in exact_div, at poly-int.h:2156 with -O -mavx512f zsojka at seznam dot cz
` (3 preceding siblings ...)
2024-02-17 10:28 ` [Bug tree-optimization/113967] [14 Regression] ICE: in exact_div, at poly-int.h:2156 with -O -mavx512f since r14-3381 jakub at gcc dot gnu.org
@ 2024-02-17 11:05 ` jakub at gcc dot gnu.org
2024-02-19 8:11 ` pinskia at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-02-17 11:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113967
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 57448
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57448&action=edit
gcc14-pr113967.patch
Untested fix.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/113967] [14 Regression] ICE: in exact_div, at poly-int.h:2156 with -O -mavx512f since r14-3381
2024-02-17 9:05 [Bug tree-optimization/113967] New: [14 Regression] ICE: in exact_div, at poly-int.h:2156 with -O -mavx512f zsojka at seznam dot cz
` (4 preceding siblings ...)
2024-02-17 11:05 ` jakub at gcc dot gnu.org
@ 2024-02-19 8:11 ` pinskia at gcc dot gnu.org
2024-02-19 8:45 ` cvs-commit at gcc dot gnu.org
2024-02-19 8:46 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-19 8:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113967
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 113962 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/113967] [14 Regression] ICE: in exact_div, at poly-int.h:2156 with -O -mavx512f since r14-3381
2024-02-17 9:05 [Bug tree-optimization/113967] New: [14 Regression] ICE: in exact_div, at poly-int.h:2156 with -O -mavx512f zsojka at seznam dot cz
` (5 preceding siblings ...)
2024-02-19 8:11 ` pinskia at gcc dot gnu.org
@ 2024-02-19 8:45 ` cvs-commit at gcc dot gnu.org
2024-02-19 8:46 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-02-19 8:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113967
--- Comment #6 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:2bfdeca19d96239479488cd07b1e952d95a02f72
commit r14-9061-g2bfdeca19d96239479488cd07b1e952d95a02f72
Author: Jakub Jelinek <jakub@redhat.com>
Date: Mon Feb 19 09:42:22 2024 +0100
match.pd: Fix ICE on BIT_INSERT_EXPR of BIT_FIELD_REF folding [PR113967]
The following testcase ICEs, because BIT_FIELD_REF's position is not
multiple of the vector element's bit size and the code uses exact_div
to divide those 2 values.
For BIT_INSERT_EXPR, the tree-cfg.cc verification verifies the position
is a multiple of the inserted bit size when inserting into vectors,
but for BIT_FIELD_REF the position can be arbitrary if within the range.
The following patch fixes that.
2024-02-19 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/113967
* match.pd (bit_insert @0 (BIT_FIELD_REF @1 ..) ..): Require
in condition that @rpos is multiple of vector element size.
* gcc.dg/pr113967.c: New test.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/113967] [14 Regression] ICE: in exact_div, at poly-int.h:2156 with -O -mavx512f since r14-3381
2024-02-17 9:05 [Bug tree-optimization/113967] New: [14 Regression] ICE: in exact_div, at poly-int.h:2156 with -O -mavx512f zsojka at seznam dot cz
` (6 preceding siblings ...)
2024-02-19 8:45 ` cvs-commit at gcc dot gnu.org
@ 2024-02-19 8:46 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-02-19 8:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113967
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-02-19 8:46 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-17 9:05 [Bug tree-optimization/113967] New: [14 Regression] ICE: in exact_div, at poly-int.h:2156 with -O -mavx512f zsojka at seznam dot cz
2024-02-17 9:18 ` [Bug tree-optimization/113967] " pinskia at gcc dot gnu.org
2024-02-17 9:22 ` pinskia at gcc dot gnu.org
2024-02-17 10:20 ` pinskia at gcc dot gnu.org
2024-02-17 10:28 ` [Bug tree-optimization/113967] [14 Regression] ICE: in exact_div, at poly-int.h:2156 with -O -mavx512f since r14-3381 jakub at gcc dot gnu.org
2024-02-17 11:05 ` jakub at gcc dot gnu.org
2024-02-19 8:11 ` pinskia at gcc dot gnu.org
2024-02-19 8:45 ` cvs-commit at gcc dot gnu.org
2024-02-19 8:46 ` 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).