public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/107786] New: [13 Regression] ICE in extract_insn, at recog.cc:2791 since r13-4151-gacbb5ef06ee978
@ 2022-11-21 9:10 marxin at gcc dot gnu.org
2022-11-21 9:10 ` [Bug target/107786] " marxin at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-11-21 9:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107786
Bug ID: 107786
Summary: [13 Regression] ICE in extract_insn, at recog.cc:2791
since r13-4151-gacbb5ef06ee978
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: marxin at gcc dot gnu.org
CC: ptomsich at gcc dot gnu.org
Target Milestone: ---
Host: x86_64-linux-gnu
Target: riscv64-unknown-linux-gnu
The following crashes now:
$ cat riscv.c
int c;
int main() {
for (;;) {
char h = c * 100;
if (h)
break;
}
}
$ /dev/shm/objdir2/gcc/xgcc -B /dev/shm/objdir2/gcc/ riscv.c -O2 -S
riscv.c: In function ‘main’:
riscv.c:9:1: error: unrecognizable insn:
9 | }
| ^
(jump_insn 37 36 15 2 (set (pc)
(if_then_else (ne (reg:SI 14 a4 [147])
(const_int 0 [0]))
(label_ref 18)
(pc))) "riscv.c":6:8 -1
(int_list:REG_BR_PROB 355222868 (nil))
-> 18)
during RTL pass: split2
riscv.c:9:1: internal compiler error: in extract_insn, at recog.cc:2791
0x13ef4be _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
/home/marxin/Programming/gcc2/gcc/rtl-error.cc:108
0x13ef4ff _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
/home/marxin/Programming/gcc2/gcc/rtl-error.cc:116
0x139e8a7 extract_insn(rtx_insn*)
/home/marxin/Programming/gcc2/gcc/recog.cc:2791
0x139e563 extract_insn_cached(rtx_insn*)
/home/marxin/Programming/gcc2/gcc/recog.cc:2680
0xf3dd44 cleanup_subreg_operands(rtx_insn*)
/home/marxin/Programming/gcc2/gcc/final.cc:3054
0x139ff38 split_insn
/home/marxin/Programming/gcc2/gcc/recog.cc:3420
0x13a00b8 split_all_insns()
/home/marxin/Programming/gcc2/gcc/recog.cc:3488
0x13a2022 execute
/home/marxin/Programming/gcc2/gcc/recog.cc:4457
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/107786] [13 Regression] ICE in extract_insn, at recog.cc:2791 since r13-4151-gacbb5ef06ee978
2022-11-21 9:10 [Bug target/107786] New: [13 Regression] ICE in extract_insn, at recog.cc:2791 since r13-4151-gacbb5ef06ee978 marxin at gcc dot gnu.org
@ 2022-11-21 9:10 ` marxin at gcc dot gnu.org
2022-11-21 9:58 ` ptomsich at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-11-21 9:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107786
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2022-11-21
Ever confirmed|0 |1
Target Milestone|--- |13.0
Status|UNCONFIRMED |NEW
Keywords| |ice-on-valid-code
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/107786] [13 Regression] ICE in extract_insn, at recog.cc:2791 since r13-4151-gacbb5ef06ee978
2022-11-21 9:10 [Bug target/107786] New: [13 Regression] ICE in extract_insn, at recog.cc:2791 since r13-4151-gacbb5ef06ee978 marxin at gcc dot gnu.org
2022-11-21 9:10 ` [Bug target/107786] " marxin at gcc dot gnu.org
@ 2022-11-21 9:58 ` ptomsich at gcc dot gnu.org
2022-11-21 11:58 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: ptomsich at gcc dot gnu.org @ 2022-11-21 9:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107786
ptomsich at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |ptomsich at gcc dot gnu.org
--- Comment #1 from ptomsich at gcc dot gnu.org ---
Looks like a dependency between a recent change of ours and another change that
is still in discussion.
I'll take this one.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/107786] [13 Regression] ICE in extract_insn, at recog.cc:2791 since r13-4151-gacbb5ef06ee978
2022-11-21 9:10 [Bug target/107786] New: [13 Regression] ICE in extract_insn, at recog.cc:2791 since r13-4151-gacbb5ef06ee978 marxin at gcc dot gnu.org
2022-11-21 9:10 ` [Bug target/107786] " marxin at gcc dot gnu.org
2022-11-21 9:58 ` ptomsich at gcc dot gnu.org
@ 2022-11-21 11:58 ` cvs-commit at gcc dot gnu.org
2022-11-21 14:25 ` marxin at gcc dot gnu.org
2022-11-21 15:06 ` ptomsich at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-11-21 11:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107786
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Philipp Tomsich <ptomsich@gcc.gnu.org>:
https://gcc.gnu.org/g:4c7d336b673df2f3bf23bc5e7a69c445a2320c04
commit r13-4201-g4c7d336b673df2f3bf23bc5e7a69c445a2320c04
Author: Philipp Tomsich <philipp.tomsich@vrull.eu>
Date: Mon Nov 21 12:44:23 2022 +0100
RISC-V: Fix ICE in branch<ANYI:mode>_shiftedarith_equals_zero
With the recent improvements to the splitting of special cases of
branch patterns on RISC-V, a dependency on an unmerged/in-discussion
change for branch-equals-zero slipped in: this allowed a non-X mode to
be presented to branch-equals-zero (where only X mode is permissible).
This addresses the issue by wrapping the ANYI operand in a paradoxical
SUBREG:X (the high bits can be safely ignored, as we we perform an
and-immediate before the branch in the pattern).
Tested against the GCC testsuite and committed as obvious.
gcc/ChangeLog:
PR target/107786
* config/riscv/riscv.md
(*branch<ANYI:mode>_shiftedarith_equals_zero): Wrap ANYI
in a subreg, as our branch instructions only supports X.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/pr107786-2.c: New test.
* gcc.target/riscv/pr107786.c: New test.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/107786] [13 Regression] ICE in extract_insn, at recog.cc:2791 since r13-4151-gacbb5ef06ee978
2022-11-21 9:10 [Bug target/107786] New: [13 Regression] ICE in extract_insn, at recog.cc:2791 since r13-4151-gacbb5ef06ee978 marxin at gcc dot gnu.org
` (2 preceding siblings ...)
2022-11-21 11:58 ` cvs-commit at gcc dot gnu.org
@ 2022-11-21 14:25 ` marxin at gcc dot gnu.org
2022-11-21 15:06 ` ptomsich at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-11-21 14:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107786
--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Thanks for the quick fix. Can I close it as fixed?
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/107786] [13 Regression] ICE in extract_insn, at recog.cc:2791 since r13-4151-gacbb5ef06ee978
2022-11-21 9:10 [Bug target/107786] New: [13 Regression] ICE in extract_insn, at recog.cc:2791 since r13-4151-gacbb5ef06ee978 marxin at gcc dot gnu.org
` (3 preceding siblings ...)
2022-11-21 14:25 ` marxin at gcc dot gnu.org
@ 2022-11-21 15:06 ` ptomsich at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: ptomsich at gcc dot gnu.org @ 2022-11-21 15:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107786
ptomsich at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #4 from ptomsich at gcc dot gnu.org ---
I kicked off some additional testing that will run overnight.
Let's close it for now and I will reopen in case that there is further fallout.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-11-21 15:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-21 9:10 [Bug target/107786] New: [13 Regression] ICE in extract_insn, at recog.cc:2791 since r13-4151-gacbb5ef06ee978 marxin at gcc dot gnu.org
2022-11-21 9:10 ` [Bug target/107786] " marxin at gcc dot gnu.org
2022-11-21 9:58 ` ptomsich at gcc dot gnu.org
2022-11-21 11:58 ` cvs-commit at gcc dot gnu.org
2022-11-21 14:25 ` marxin at gcc dot gnu.org
2022-11-21 15:06 ` ptomsich 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).