public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/104004] New: [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)
@ 2022-01-13 10:42 asolokha at gmx dot com
2022-01-13 11:02 ` [Bug target/104004] " rguenth at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: asolokha at gmx dot com @ 2022-01-13 10:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104004
Bug ID: 104004
Summary: [12 Regression] ICE: in extract_insn, at recog.c:2769
(error: unrecognizable insn)
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: asolokha at gmx dot com
CC: linkw at gcc dot gnu.org, wschmidt at gcc dot gnu.org
Target Milestone: ---
Target: powerpc-*-linux-gnu
1. gcc 12.0.0 20220109 snapshot (g:49d73c9fb644673323845efebfe6b3106e70af8a)
ICEs when compiling gcc/testsuite/gcc.target/powerpc/mffscrni_p9.c w/
-mcpu=e300c2:
% powerpc-e300c3-linux-gnu-gcc-12.0.0 -mcpu=e300c2 -c
gcc/testsuite/gcc.target/powerpc/mffscrni_p9.c
gcc/testsuite/gcc.target/powerpc/mffscrni_p9.c: In function 'foo':
gcc/testsuite/gcc.target/powerpc/mffscrni_p9.c:9:1: error: unrecognizable insn:
9 | }
| ^
(insn 15 14 16 2 (set (reg:DF 119)
(unspec_volatile:DF [
(const_int 0 [0])
] UNSPECV_MFFS))
"gcc/testsuite/gcc.target/powerpc/mffscrni_p9.c":8:3 -1
(nil))
during RTL pass: vregs
gcc/testsuite/gcc.target/powerpc/mffscrni_p9.c:9:1: internal compiler error: in
extract_insn, at recog.c:2769
0x6adda1 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20220109/work/gcc-12-20220109/gcc/rtl-error.c:108
0x6addc1 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20220109/work/gcc-12-20220109/gcc/rtl-error.c:116
0x6ac3cf extract_insn(rtx_insn*)
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20220109/work/gcc-12-20220109/gcc/recog.c:2769
0xb23843 instantiate_virtual_regs_in_insn
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20220109/work/gcc-12-20220109/gcc/function.c:1611
0xb23843 instantiate_virtual_regs
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20220109/work/gcc-12-20220109/gcc/function.c:1985
0xb23843 execute
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20220109/work/gcc-12-20220109/gcc/function.c:2034
2. After adding -O1 (in fact, w/ any optimization level) to the command line,
it fails to recognize UNSPECV_MTFSB0 instead:
% powerpc-e300c3-linux-gnu-gcc-12.0.0 -mcpu=e300c2 -O1 -c
gcc/testsuite/gcc.target/powerpc/mffscrni_p9.c
gcc/testsuite/gcc.target/powerpc/mffscrni_p9.c: In function 'foo':
gcc/testsuite/gcc.target/powerpc/mffscrni_p9.c:9:1: error: unrecognizable insn:
9 | }
| ^
(insn 5 2 6 2 (unspec_volatile [
(const_int 31 [0x1f])
] UNSPECV_MTFSB0) "gcc/testsuite/gcc.target/powerpc/mffscrni_p9.c":8:3
-1
(nil))
during RTL pass: vregs
gcc/testsuite/gcc.target/powerpc/mffscrni_p9.c:9:1: internal compiler error: in
extract_insn, at recog.c:2769
0x6adda1 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20220109/work/gcc-12-20220109/gcc/rtl-error.c:108
0x6addc1 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20220109/work/gcc-12-20220109/gcc/rtl-error.c:116
0x6ac3cf extract_insn(rtx_insn*)
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20220109/work/gcc-12-20220109/gcc/recog.c:2769
0xb2309c instantiate_virtual_regs_in_insn
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20220109/work/gcc-12-20220109/gcc/function.c:1660
0xb2309c instantiate_virtual_regs
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20220109/work/gcc-12-20220109/gcc/function.c:1985
0xb2309c execute
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20220109/work/gcc-12-20220109/gcc/function.c:2034
Other builtins related to loading (storing) data from (to) FPSCR are also
affected.
gcc 11.2 rejects the code correctly w/ the following diagnostics:
% powerpc-e300c3-linux-gnu-gcc-11.2.0 -mcpu=e300c2 -O1 -c
gcc/testsuite/gcc.target/powerpc/mffscrni_p9.c
gcc/testsuite/gcc.target/powerpc/mffscrni_p9.c: In function 'foo':
gcc/testsuite/gcc.target/powerpc/mffscrni_p9.c:8:3: error:
'__builtin_set_fpscr_rn' not supported with '-msoft-float'
8 | __builtin_set_fpscr_rn (val);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/104004] [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)
2022-01-13 10:42 [Bug target/104004] New: [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn) asolokha at gmx dot com
@ 2022-01-13 11:02 ` rguenth at gcc dot gnu.org
2022-01-13 12:12 ` linkw at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-13 11:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104004
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/104004] [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)
2022-01-13 10:42 [Bug target/104004] New: [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn) asolokha at gmx dot com
2022-01-13 11:02 ` [Bug target/104004] " rguenth at gcc dot gnu.org
@ 2022-01-13 12:12 ` linkw at gcc dot gnu.org
2022-01-18 13:54 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: linkw at gcc dot gnu.org @ 2022-01-13 12:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104004
Kewen Lin <linkw at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2022-01-13
--- Comment #1 from Kewen Lin <linkw at gcc dot gnu.org> ---
Thanks for reporting!
We have the below check in rs6000_expand_set_fpscr_rn_builtin before:
if (rs6000_isa_flags & OPTION_MASK_SOFT_FLOAT)
{
error ("%<__builtin_set_fpscr_rn%> not supported with %<-msoft-float%>");
return const0_rtx;
}
It's supposed to be updated with new attribute nosoft in new bif support.
But grepping in the latest trunk code, there are no bifs using nosoft, I guess
there are something not upstreamed eventually unexpectedly.
The fix seems to add nosoft attribute for __builtin_set_fpscr_rn entry.
Besides, by checking in old bif support, the below ones also require nosoft:
__builtin_set_fpscr_drn (this one needs no32bit)
__builtin_mffsl
__builtin_mtfsb0
__builtin_mtfsb1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/104004] [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)
2022-01-13 10:42 [Bug target/104004] New: [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn) asolokha at gmx dot com
2022-01-13 11:02 ` [Bug target/104004] " rguenth at gcc dot gnu.org
2022-01-13 12:12 ` linkw at gcc dot gnu.org
@ 2022-01-18 13:54 ` rguenth at gcc dot gnu.org
2022-02-18 6:03 ` linkw at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-18 13:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104004
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/104004] [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)
2022-01-13 10:42 [Bug target/104004] New: [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn) asolokha at gmx dot com
` (2 preceding siblings ...)
2022-01-18 13:54 ` rguenth at gcc dot gnu.org
@ 2022-02-18 6:03 ` linkw at gcc dot gnu.org
2022-03-31 22:11 ` cvs-commit at gcc dot gnu.org
2022-03-31 22:17 ` segher at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: linkw at gcc dot gnu.org @ 2022-02-18 6:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104004
Kewen Lin <linkw at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |wschmidt at gcc dot gnu.org
URL| |https://gcc.gnu.org/piperma
| |il/gcc-patches/2022-January
| |/589441.html
--- Comment #2 from Kewen Lin <linkw at gcc dot gnu.org> ---
Bill already posted one patch for it.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/104004] [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)
2022-01-13 10:42 [Bug target/104004] New: [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn) asolokha at gmx dot com
` (3 preceding siblings ...)
2022-02-18 6:03 ` linkw at gcc dot gnu.org
@ 2022-03-31 22:11 ` cvs-commit at gcc dot gnu.org
2022-03-31 22:17 ` segher at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-03-31 22:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104004
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Segher Boessenkool <segher@gcc.gnu.org>:
https://gcc.gnu.org/g:aaf3a5993ae49f1ae6792800e5161a1d51436ed3
commit r12-7945-gaaf3a5993ae49f1ae6792800e5161a1d51436ed3
Author: Bill Schmidt <wschmidt@linux.ibm.com>
Date: Fri Jan 28 11:50:26 2022 -0600
rs6000: Fix some missing built-in attributes [PR104004]
PR104004 caught some misses on my part in converting to the new built-in
function infrastructure. In particular, I forgot to mark all of the
"nosoft"
built-ins, and one of those should also have been marked "no32bit".
2022-01-27 Bill Schmidt <wschmidt@linux.ibm.com>
gcc/
PR target/104004
* config/rs6000/rs6000-builtins.def (MFFSL): Mark nosoft.
(MTFSB0): Likewise.
(MTFSB1): Likewise.
(SET_FPSCR_RN): Likewise.
(SET_FPSCR_DRN): Mark nosoft and no32bit.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/104004] [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)
2022-01-13 10:42 [Bug target/104004] New: [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn) asolokha at gmx dot com
` (4 preceding siblings ...)
2022-03-31 22:11 ` cvs-commit at gcc dot gnu.org
@ 2022-03-31 22:17 ` segher at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: segher at gcc dot gnu.org @ 2022-03-31 22:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104004
Segher Boessenkool <segher at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
CC| |segher at gcc dot gnu.org
Resolution|--- |FIXED
--- Comment #4 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Fixed now.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-03-31 22:17 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-13 10:42 [Bug target/104004] New: [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn) asolokha at gmx dot com
2022-01-13 11:02 ` [Bug target/104004] " rguenth at gcc dot gnu.org
2022-01-13 12:12 ` linkw at gcc dot gnu.org
2022-01-18 13:54 ` rguenth at gcc dot gnu.org
2022-02-18 6:03 ` linkw at gcc dot gnu.org
2022-03-31 22:11 ` cvs-commit at gcc dot gnu.org
2022-03-31 22:17 ` segher 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).