public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/107672] New: [13 Regression] ICE during GIMPLE pass: slp
@ 2022-11-14 6:50 creatorsmithmdt at gmail dot com
2022-11-14 14:03 ` [Bug tree-optimization/107672] " rguenth at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: creatorsmithmdt at gmail dot com @ 2022-11-14 6:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107672
Bug ID: 107672
Summary: [13 Regression] ICE during GIMPLE pass: slp
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: creatorsmithmdt at gmail dot com
Target Milestone: ---
The slp GIMPLE pass now ICE's on this code, which it did not previously. While
I am aware GCJ is not currently part of GCC, the GIMPLE it generates is valid
and should not be ICE'ing.
It does not ICE on O1.
This bug occurs on my msterstable branch.
(https://github.com/Zopolis4/gcj/commits/msterstable)
Given that GCJ is not currently part of GCC, and this bug is thus harder to
reproduce as one has to compile my fork, is there a better way for me to report
this? Maybe I could just send the generated GIMPLE that ICE's?
~/g/x/libjava> /bin/bash ./libtool --tag=GCJ --mode=compile
/home/zopolis4/gcjbuild/./gcc/gcj
-B/home/zopolis4/gcjbuild/x86_64-pc-linux-gnu/libjava/
-B/home/zopolis4/gcjbuild/./gcc/ -B/usr/local/x86_64-pc-linux-gnu/bin/
-B/usr/local/x86_64-pc-linux-gnu/lib/ -isystem
/usr/local/x86_64-pc-linux-gnu/include -isystem /usr/
local/x86_64-pc-linux-gnu/sys-include -fomit-frame-pointer -Usun
-fclasspath=
-fbootclasspath=/home/zopolis4/gcjbuild/../gcj/libjava/classpath/lib
--encoding=UTF-8 -Wno-
deprecated -fbootstrap-classes -g -O2 -c -o gnu/java/security/hash.lo
-fsource-filename=/home/zopolis4/gcjbuild/x86_64-pc-linux-gnu/libjava/classpath/lib/classes
-MT gnu/j
ava/security/hash.lo -MD -MP -MF gnu/java/security/hash.deps
@gnu/java/security/hash.list
libtool: compile: /home/zopolis4/gcjbuild/./gcc/gcj
-B/home/zopolis4/gcjbuild/x86_64-pc-linux-gnu/libjava/
-B/home/zopolis4/gcjbuild/./gcc/ -B/usr/local/x86_64-pc-linux-gnu/bin/
-B/usr/local/x86_64-pc-linux-gnu/lib/ -isystem
/usr/local/x86_64-pc-linux-gnu/include -isystem
/usr/local/x86_64-pc-linux-gnu/sys-include -fomit-frame-pointer -Usun
-fclasspath=
-fbootclasspath=/home/zopolis4/gcjbuild/../gcj/libjava/classpath/lib
--encoding=UTF-8 -Wno-deprecated -fbootstrap-classes -g -O2 -c
-fsource-filename=/home/zopolis4/gcjbuild/x86_64-pc-linux-gnu/libjava/classpath/lib/classes
-MT gnu/java/security/hash.lo -MD -MP -MF gnu/java/security/hash.deps
@gnu/java/security/hash.list -fPIC -o gnu/java/security/.libs/hash.o
during GIMPLE pass: slp
/home/zopolis4/gcj/libjava/classpath/gnu/java/security/hash/Whirlpool.java: In
class 'gnu.java.security.hash.Whirlpool':
/home/zopolis4/gcj/libjava/classpath/gnu/java/security/hash/Whirlpool.java: In
method 'gnu.java.security.hash.Whirlpool.transform(byte[],int)':
In file included from
/home/zopolis4/gcj/libjava/classpath/gnu/java/security/hash/Tiger.java:863,
from
/home/zopolis4/gcj/libjava/classpath/gnu/java/security/hash/Sha512.java:277,
from
/home/zopolis4/gcj/libjava/classpath/gnu/java/security/hash/Sha384.java:275,
from
/home/zopolis4/gcj/libjava/classpath/gnu/java/security/hash/Sha256.java:248,
from
/home/zopolis4/gcj/libjava/classpath/gnu/java/security/hash/Sha160.java:239,
from
/home/zopolis4/gcj/libjava/classpath/gnu/java/security/hash/RipeMD160.java:289,
from
/home/zopolis4/gcj/libjava/classpath/gnu/java/security/hash/RipeMD128.java:255,
from
/home/zopolis4/gcj/libjava/classpath/gnu/java/security/hash/MD5.java:369,
from
/home/zopolis4/gcj/libjava/classpath/gnu/java/security/hash/MD4.java:336,
from
/home/zopolis4/gcj/libjava/classpath/gnu/java/security/hash/MD2.java:255,
from
/home/zopolis4/gcj/libjava/classpath/gnu/java/security/hash/IMessageDigest.java:31,
from
/home/zopolis4/gcj/libjava/classpath/gnu/java/security/hash/Haval.java:805,
from
/home/zopolis4/gcj/libjava/classpath/gnu/java/security/hash/HashFactory.java:1764,
from
/home/zopolis4/gcj/libjava/classpath/gnu/java/security/hash/BaseHash.java:437,
from <built-in>:575:
/home/zopolis4/gcj/libjava/classpath/gnu/java/security/hash/Whirlpool.java:299:
internal compiler error: Segmentation fault
299 | n0 = (in[offset++] & 0xFFL) << 56
|
0xdac2af crash_signal
/home/zopolis4/gcjbuild/../gcj/gcc/toplev.cc:314
0x1d10ee7 supportable_widening_operation(vec_info*, tree_code, _stmt_vec_info*,
tree_node*, tree_node*, tree_code*, tree_code*, int*, vec<tree_node*, va_heap,
vl_ptr>*)
/home/zopolis4/gcjbuild/../gcj/gcc/tree-vect-stmts.cc:12196
0x1d3094c vectorizable_conversion
/home/zopolis4/gcjbuild/../gcj/gcc/tree-vect-stmts.cc:5064
0x1d31a18 vect_analyze_stmt(vec_info*, _stmt_vec_info*, bool*, _slp_tree*,
_slp_instance*, vec<stmt_info_for_cost, va_heap, vl_ptr>*)
/home/zopolis4/gcjbuild/../gcj/gcc/tree-vect-stmts.cc:11247
0x106344e vect_slp_analyze_node_operations_1
/home/zopolis4/gcjbuild/../gcj/gcc/tree-vect-slp.cc:5957
0x106344e vect_slp_analyze_node_operations
/home/zopolis4/gcjbuild/../gcj/gcc/tree-vect-slp.cc:6147
0x106335a vect_slp_analyze_node_operations
/home/zopolis4/gcjbuild/../gcj/gcc/tree-vect-slp.cc:6126
0x106335a vect_slp_analyze_node_operations
/home/zopolis4/gcjbuild/../gcj/gcc/tree-vect-slp.cc:6126
0x106335a vect_slp_analyze_node_operations
/home/zopolis4/gcjbuild/../gcj/gcc/tree-vect-slp.cc:6126
0x106335a vect_slp_analyze_node_operations
/home/zopolis4/gcjbuild/../gcj/gcc/tree-vect-slp.cc:6126
0x106335a vect_slp_analyze_node_operations
/home/zopolis4/gcjbuild/../gcj/gcc/tree-vect-slp.cc:6126
0x106335a vect_slp_analyze_node_operations
/home/zopolis4/gcjbuild/../gcj/gcc/tree-vect-slp.cc:6126
0x106335a vect_slp_analyze_node_operations
/home/zopolis4/gcjbuild/../gcj/gcc/tree-vect-slp.cc:6126
0x106335a vect_slp_analyze_node_operations
/home/zopolis4/gcjbuild/../gcj/gcc/tree-vect-slp.cc:6126
0x106335a vect_slp_analyze_node_operations
/home/zopolis4/gcjbuild/../gcj/gcc/tree-vect-slp.cc:6126
0x1064f0b vect_slp_analyze_operations(vec_info*)
/home/zopolis4/gcjbuild/../gcj/gcc/tree-vect-slp.cc:6387
0x106b262 vect_slp_analyze_bb_1
/home/zopolis4/gcjbuild/../gcj/gcc/tree-vect-slp.cc:7372
0x106b262 vect_slp_region
/home/zopolis4/gcjbuild/../gcj/gcc/tree-vect-slp.cc:7419
0x106cc2c vect_slp_bbs
/home/zopolis4/gcjbuild/../gcj/gcc/tree-vect-slp.cc:7610
0x106ceb3 vect_slp_function(function*)
/home/zopolis4/gcjbuild/../gcj/gcc/tree-vect-slp.cc:7698
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/107672] [13 Regression] ICE during GIMPLE pass: slp
2022-11-14 6:50 [Bug tree-optimization/107672] New: [13 Regression] ICE during GIMPLE pass: slp creatorsmithmdt at gmail dot com
@ 2022-11-14 14:03 ` rguenth at gcc dot gnu.org
2022-11-22 8:03 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-11-14 14:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107672
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
CC| |rguenth at gcc dot gnu.org
Target Milestone|--- |13.0
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
for (i = 0; i < MAX_INTERM_CVT_STEPS; i++)
{
intermediate_mode = insn_data[icode1].operand[0].mode;
if (VECTOR_BOOLEAN_TYPE_P (prev_type))
intermediate_type
= vect_halve_mask_nunits (prev_type, intermediate_mode);
else
intermediate_type
= lang_hooks.types.type_for_mode (intermediate_mode,
TYPE_UNSIGNED (prev_type));
if (VECTOR_BOOLEAN_TYPE_P (intermediate_type)
that fails to check for the case the langhook returns NULL. In fact,
using build_nonstandard_integer_type is prefered, just use
GET_MODE_PRECISION on the intermediate_mode.
Note that's just guessed from the backtrace reported. If you can fire up
gdb and see what it actually segfaults on that would be helpful. Likewise
the above would suggest your type_for_mode needs amemdment.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/107672] [13 Regression] ICE during GIMPLE pass: slp
2022-11-14 6:50 [Bug tree-optimization/107672] New: [13 Regression] ICE during GIMPLE pass: slp creatorsmithmdt at gmail dot com
2022-11-14 14:03 ` [Bug tree-optimization/107672] " rguenth at gcc dot gnu.org
@ 2022-11-22 8:03 ` rguenth at gcc dot gnu.org
2022-11-22 8:06 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-11-22 8:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107672
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
It looks like the code looks for a vector type even ... I'm going to test
diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
index bc0ef136f19..b35b986889d 100644
--- a/gcc/tree-vect-stmts.cc
+++ b/gcc/tree-vect-stmts.cc
@@ -12195,9 +12195,15 @@ supportable_widening_operation (vec_info *vinfo,
intermediate_type
= vect_halve_mask_nunits (prev_type, intermediate_mode);
else
- intermediate_type
- = lang_hooks.types.type_for_mode (intermediate_mode,
- TYPE_UNSIGNED (prev_type));
+ {
+ gcc_assert (VECTOR_MODE_P (intermediate_mode));
+ tree intermediate_element_type
+ = lang_hooks.types.type_for_mode (GET_MODE_INNER
(intermediate_mode),
+ TYPE_UNSIGNED (prev_type));
+ intermediate_type
+ = build_vector_type_for_mode (intermediate_element_type,
+ intermediate_mode);
+ }
if (VECTOR_BOOLEAN_TYPE_P (intermediate_type)
&& VECTOR_BOOLEAN_TYPE_P (prev_type)
can you check if that helps the Java frontend here?
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/107672] [13 Regression] ICE during GIMPLE pass: slp
2022-11-14 6:50 [Bug tree-optimization/107672] New: [13 Regression] ICE during GIMPLE pass: slp creatorsmithmdt at gmail dot com
2022-11-14 14:03 ` [Bug tree-optimization/107672] " rguenth at gcc dot gnu.org
2022-11-22 8:03 ` rguenth at gcc dot gnu.org
@ 2022-11-22 8:06 ` rguenth at gcc dot gnu.org
2022-11-22 8:15 ` creatorsmithmdt at gmail dot com
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-11-22 8:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107672
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Status|UNCONFIRMED |ASSIGNED
Ever confirmed|0 |1
Last reconfirmed| |2022-11-22
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/107672] [13 Regression] ICE during GIMPLE pass: slp
2022-11-14 6:50 [Bug tree-optimization/107672] New: [13 Regression] ICE during GIMPLE pass: slp creatorsmithmdt at gmail dot com
` (2 preceding siblings ...)
2022-11-22 8:06 ` rguenth at gcc dot gnu.org
@ 2022-11-22 8:15 ` creatorsmithmdt at gmail dot com
2022-11-22 8:49 ` cvs-commit at gcc dot gnu.org
2022-11-22 8:49 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: creatorsmithmdt at gmail dot com @ 2022-11-22 8:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107672
--- Comment #3 from Zopolis0 <creatorsmithmdt at gmail dot com> ---
I was in the middle of bisecting it, but that solved the issue perfectly!
Thanks!
I haven't tested it yet on a fresh rebase on upstream, but there's no reason
why it wouldn't work there.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/107672] [13 Regression] ICE during GIMPLE pass: slp
2022-11-14 6:50 [Bug tree-optimization/107672] New: [13 Regression] ICE during GIMPLE pass: slp creatorsmithmdt at gmail dot com
` (3 preceding siblings ...)
2022-11-22 8:15 ` creatorsmithmdt at gmail dot com
@ 2022-11-22 8:49 ` cvs-commit at gcc dot gnu.org
2022-11-22 8:49 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-11-22 8:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107672
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:09b7993ab6d93716f77c03ff9a9165fa4b579f0d
commit r13-4227-g09b7993ab6d93716f77c03ff9a9165fa4b579f0d
Author: Richard Biener <rguenther@suse.de>
Date: Tue Nov 22 09:03:53 2022 +0100
tree-optimization/107672 - avoid vector mode type_for_mode call
The following avoids using type_for_mode on vector modes which might
not work for all frontends. Instead we look for the inner mode
type and use build_vector_type_for_mode instead.
PR tree-optimization/107672
* tree-vect-stmts.cc (supportable_widening_operation): Avoid
type_for_mode on vector modes.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/107672] [13 Regression] ICE during GIMPLE pass: slp
2022-11-14 6:50 [Bug tree-optimization/107672] New: [13 Regression] ICE during GIMPLE pass: slp creatorsmithmdt at gmail dot com
` (4 preceding siblings ...)
2022-11-22 8:49 ` cvs-commit at gcc dot gnu.org
@ 2022-11-22 8:49 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-11-22 8:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107672
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed then. Thanks for reporting.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-11-22 8:49 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-14 6:50 [Bug tree-optimization/107672] New: [13 Regression] ICE during GIMPLE pass: slp creatorsmithmdt at gmail dot com
2022-11-14 14:03 ` [Bug tree-optimization/107672] " rguenth at gcc dot gnu.org
2022-11-22 8:03 ` rguenth at gcc dot gnu.org
2022-11-22 8:06 ` rguenth at gcc dot gnu.org
2022-11-22 8:15 ` creatorsmithmdt at gmail dot com
2022-11-22 8:49 ` cvs-commit at gcc dot gnu.org
2022-11-22 8:49 ` rguenth 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).