public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/106450] New: [13 Regression] ICE in final_scan_insn_1, at final.cc:2860 (error: could not split insn)
@ 2022-07-26 18:44 asolokha at gmx dot com
2022-07-26 20:52 ` [Bug target/106450] " hjl.tools at gmail dot com
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: asolokha at gmx dot com @ 2022-07-26 18:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106450
Bug ID: 106450
Summary: [13 Regression] ICE in final_scan_insn_1, at
final.cc:2860 (error: could not split insn)
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: asolokha at gmx dot com
Target Milestone: ---
Target: x86_64-unknown-linux-gnu
gcc 13.0.0 20220724 snapshot (g:8b8103dcd2624936bd1f56ac2ee63d1fb779a7e4) ICEs
when compiling the following testcase w/ -O2 -fsplit-paths:
__int128 n;
__attribute__ ((simd)) void
foo (void)
{
__int128 uninitialized;
unsigned __int128 *p = &n;
n >>= *p ? : 2;
n |= uninitialized;
}
% x86_64-unknown-linux-gnu-gcc-13.0.0 -O2 -fsplit-paths -c bov4bfel.c
bov4bfel.c: In function 'foo.simdclone.0':
bov4bfel.c:11:1: error: could not split insn
11 | }
| ^
(insn:TI 14 75 61 4 (parallel [
(set (reg:TI 0 ax [92])
(ior:TI (reg:TI 0 ax [91])
(mem/c:V1TI (plus:DI (reg/f:DI 7 sp)
(const_int -24 [0xffffffffffffffe8])) [2 %sfp+-16
S16 A128])))
(clobber (reg:CC 17 flags))
]) "bov4bfel.c":10:5 573 {*iorti3_doubleword}
(expr_list:REG_UNUSED (reg:CC 17 flags)
(expr_list:REG_EQUIV (mem/c:TI (symbol_ref:DI ("n") [flags 0x2]
<var_decl 0x7f1053cffbd0 n>) [1 n+0 S16 A128])
(nil))))
during RTL pass: final
bov4bfel.c:11:1: internal compiler error: in final_scan_insn_1, at
final.cc:2860
0x72828d _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220724/work/gcc-13-20220724/gcc/rtl-error.cc:108
0x6bc8a6 final_scan_insn_1
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220724/work/gcc-13-20220724/gcc/final.cc:2860
0xb3597b final_scan_insn(rtx_insn*, _IO_FILE*, int, int, int*)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220724/work/gcc-13-20220724/gcc/final.cc:2939
0xb35b24 final_1
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220724/work/gcc-13-20220724/gcc/final.cc:1996
0xb366d6 rest_of_handle_final
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220724/work/gcc-13-20220724/gcc/final.cc:4284
0xb366d6 execute
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220724/work/gcc-13-20220724/gcc/final.cc:4364
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/106450] [13 Regression] ICE in final_scan_insn_1, at final.cc:2860 (error: could not split insn)
2022-07-26 18:44 [Bug target/106450] New: [13 Regression] ICE in final_scan_insn_1, at final.cc:2860 (error: could not split insn) asolokha at gmx dot com
@ 2022-07-26 20:52 ` hjl.tools at gmail dot com
2022-07-27 8:30 ` [Bug target/106450] [13 Regression] ICE in final_scan_insn_1, at final.cc:2860 (error: could not split insn) since r13-1607-gc3ed9e0d6e96d869 marxin at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2022-07-26 20:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106450
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Target Milestone|--- |13.0
Last reconfirmed| |2022-07-26
Status|UNCONFIRMED |NEW
CC| |roger at nextmovesoftware dot com
--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
timode_remove_non_convertible_regs should be changed to handle all
new operations like
(insn 16 15 17 5 (parallel [
(set (reg:TI 92)
(ior:TI (reg:TI 91)
(reg/v:TI 87 [ uninitialized ])))
(clobber (reg:CC 17 flags))
]) "x.c":10:5 578 {*iorti3_doubleword}
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/106450] [13 Regression] ICE in final_scan_insn_1, at final.cc:2860 (error: could not split insn) since r13-1607-gc3ed9e0d6e96d869
2022-07-26 18:44 [Bug target/106450] New: [13 Regression] ICE in final_scan_insn_1, at final.cc:2860 (error: could not split insn) asolokha at gmx dot com
2022-07-26 20:52 ` [Bug target/106450] " hjl.tools at gmail dot com
@ 2022-07-27 8:30 ` marxin at gcc dot gnu.org
2022-07-27 11:35 ` roger at nextmovesoftware dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-07-27 8:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106450
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marxin at gcc dot gnu.org
Summary|[13 Regression] ICE in |[13 Regression] ICE in
|final_scan_insn_1, at |final_scan_insn_1, at
|final.cc:2860 (error: could |final.cc:2860 (error: could
|not split insn) |not split insn) since
| |r13-1607-gc3ed9e0d6e96d869
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r13-1607-gc3ed9e0d6e96d869.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/106450] [13 Regression] ICE in final_scan_insn_1, at final.cc:2860 (error: could not split insn) since r13-1607-gc3ed9e0d6e96d869
2022-07-26 18:44 [Bug target/106450] New: [13 Regression] ICE in final_scan_insn_1, at final.cc:2860 (error: could not split insn) asolokha at gmx dot com
2022-07-26 20:52 ` [Bug target/106450] " hjl.tools at gmail dot com
2022-07-27 8:30 ` [Bug target/106450] [13 Regression] ICE in final_scan_insn_1, at final.cc:2860 (error: could not split insn) since r13-1607-gc3ed9e0d6e96d869 marxin at gcc dot gnu.org
@ 2022-07-27 11:35 ` roger at nextmovesoftware dot com
2022-07-31 7:36 ` roger at nextmovesoftware dot com
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: roger at nextmovesoftware dot com @ 2022-07-27 11:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106450
Roger Sayle <roger at nextmovesoftware dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |roger at nextmovesoftware dot com
--- Comment #3 from Roger Sayle <roger at nextmovesoftware dot com> ---
I'm bootstrapping and regression testing a fix now.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/106450] [13 Regression] ICE in final_scan_insn_1, at final.cc:2860 (error: could not split insn) since r13-1607-gc3ed9e0d6e96d869
2022-07-26 18:44 [Bug target/106450] New: [13 Regression] ICE in final_scan_insn_1, at final.cc:2860 (error: could not split insn) asolokha at gmx dot com
` (2 preceding siblings ...)
2022-07-27 11:35 ` roger at nextmovesoftware dot com
@ 2022-07-31 7:36 ` roger at nextmovesoftware dot com
2022-07-31 20:47 ` cvs-commit at gcc dot gnu.org
2022-08-01 22:16 ` roger at nextmovesoftware dot com
5 siblings, 0 replies; 7+ messages in thread
From: roger at nextmovesoftware dot com @ 2022-07-31 7:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106450
Roger Sayle <roger at nextmovesoftware dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |zsojka at seznam dot cz
--- Comment #4 from Roger Sayle <roger at nextmovesoftware dot com> ---
*** Bug 106488 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/106450] [13 Regression] ICE in final_scan_insn_1, at final.cc:2860 (error: could not split insn) since r13-1607-gc3ed9e0d6e96d869
2022-07-26 18:44 [Bug target/106450] New: [13 Regression] ICE in final_scan_insn_1, at final.cc:2860 (error: could not split insn) asolokha at gmx dot com
` (3 preceding siblings ...)
2022-07-31 7:36 ` roger at nextmovesoftware dot com
@ 2022-07-31 20:47 ` cvs-commit at gcc dot gnu.org
2022-08-01 22:16 ` roger at nextmovesoftware dot com
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-07-31 20:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106450
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Roger Sayle <sayle@gcc.gnu.org>:
https://gcc.gnu.org/g:493f4e6cf081ea2d016547629b29d130c1533ccb
commit r13-1906-g493f4e6cf081ea2d016547629b29d130c1533ccb
Author: Roger Sayle <roger@nextmovesoftware.com>
Date: Sun Jul 31 21:44:51 2022 +0100
PR target/106450: Tweak timode_remove_non_convertible_regs on x86_64.
This patch resolves PR target/106450, some more fall-out from more
aggressive TImode scalar-to-vector (STV) optimizations. I continue
to be caught out by how far TImode STV has diverged from DImode/SImode
STV, and therefore requires additional (unexpected) tweaking. Many
thanks to H.J. Lu for pointing out timode_remove_non_convertible_regs
needs to be extended to handle XOR (and other new operations).
Unhelpfully the comment above this function states that it's the TImode
version of "remove_non_convertible_regs", which doesn't exist anymore,
so I've resurrected an explanatory comment from the git history.
By refactoring the checks for hard regs and already "marked" regs
into timode_check_non_convertible_regs itself, all of its callers are
simplified. This patch then FOR_EACH_INSN_USE and FOR_EACH_INSN_DEF
to generically handle arbitrary (non-move) instructions (including
unary and binary operations), calling timode_check_non_convertible_regs
on each TImode register USE and DEF.
2022-07-31 Roger Sayle <roger@nextmovesoftware.com>
H.J. Lu <hjl.tools@gmail.com>
gcc/ChangeLog
PR target/106450
* config/i386/i386-features.cc (timode_check_non_convertible_regs):
Do nothing if REGNO is set in the REGS bitmap, or is a hard reg.
(timode_remove_non_convertible_regs): Update comment.
Call timode_check_non_convertible_reg on all TImode register
DEFs and USEs in each instruction.
gcc/testsuite/ChangeLog
PR target/106450
* gcc.target/i386/pr106450.c: New test case.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/106450] [13 Regression] ICE in final_scan_insn_1, at final.cc:2860 (error: could not split insn) since r13-1607-gc3ed9e0d6e96d869
2022-07-26 18:44 [Bug target/106450] New: [13 Regression] ICE in final_scan_insn_1, at final.cc:2860 (error: could not split insn) asolokha at gmx dot com
` (4 preceding siblings ...)
2022-07-31 20:47 ` cvs-commit at gcc dot gnu.org
@ 2022-08-01 22:16 ` roger at nextmovesoftware dot com
5 siblings, 0 replies; 7+ messages in thread
From: roger at nextmovesoftware dot com @ 2022-08-01 22:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106450
Roger Sayle <roger at nextmovesoftware dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from Roger Sayle <roger at nextmovesoftware dot com> ---
This should now be fixed on mainline.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-08-01 22:16 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-26 18:44 [Bug target/106450] New: [13 Regression] ICE in final_scan_insn_1, at final.cc:2860 (error: could not split insn) asolokha at gmx dot com
2022-07-26 20:52 ` [Bug target/106450] " hjl.tools at gmail dot com
2022-07-27 8:30 ` [Bug target/106450] [13 Regression] ICE in final_scan_insn_1, at final.cc:2860 (error: could not split insn) since r13-1607-gc3ed9e0d6e96d869 marxin at gcc dot gnu.org
2022-07-27 11:35 ` roger at nextmovesoftware dot com
2022-07-31 7:36 ` roger at nextmovesoftware dot com
2022-07-31 20:47 ` cvs-commit at gcc dot gnu.org
2022-08-01 22:16 ` roger at nextmovesoftware dot com
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).