public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/113615] New: internal compiler error: in extract_insn, at recog.cc:2812
@ 2024-01-26 10:53 rguenth at gcc dot gnu.org
2024-01-28 19:06 ` [Bug target/113615] " pinskia at gcc dot gnu.org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-01-26 10:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113615
Bug ID: 113615
Summary: internal compiler error: in extract_insn, at
recog.cc:2812
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: rguenth at gcc dot gnu.org
Target Milestone: ---
I'm seeing a lot of ICEs like this when running libgomp testsuite with
offloading for gfx1030.
/space/rguenther/src/gcc-autopar_devel/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-4.f90:
In function 'accum_._omp_fn.1':^M
/space/rguenther/src/gcc-autopar_devel/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-4.f90:20:38:
error: unrecognizable insn:^M
(insn 108 107 109 6 (set (reg:V8SF 849)^M
(unspec:V8SF [^M
(reg:V8SF 844 [ vect__43.12_106 ]) repeated x2^M
(const_int 1 [0x1])^M
] UNSPEC_PLUS_DPP_SHR))
"/space/rguenther/src/gcc-autopar_devel/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-4.f90":22:29
discrim 1 -1^M
(nil))^M
during RTL pass: vregs^M
/space/rguenther/src/gcc-autopar_devel/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-4.f90:20:38:
internal compiler error: in extract_insn, at recog.cc:2812^M
other ones:
(insn 93 92 94 7 (set (reg:V64DF 805)^M
(unspec:V64DF [^M
(reg:V64DF 802 [ vect__31.53_89 ])^M
(const_int 1 [0x1])^M
] UNSPEC_MOV_DPP_SHR))
"/space/rguenther/src/gcc-autopar_devel/libgomp/testsuite/libgomp.fortran/examples-4/target_data-3.f90":51:41
-1^M
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/113615] internal compiler error: in extract_insn, at recog.cc:2812
2024-01-26 10:53 [Bug target/113615] New: internal compiler error: in extract_insn, at recog.cc:2812 rguenth at gcc dot gnu.org
@ 2024-01-28 19:06 ` pinskia at gcc dot gnu.org
2024-01-28 19:37 ` burnus at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-28 19:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113615
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 113645 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/113615] internal compiler error: in extract_insn, at recog.cc:2812
2024-01-26 10:53 [Bug target/113615] New: internal compiler error: in extract_insn, at recog.cc:2812 rguenth at gcc dot gnu.org
2024-01-28 19:06 ` [Bug target/113615] " pinskia at gcc dot gnu.org
@ 2024-01-28 19:37 ` burnus at gcc dot gnu.org
2024-01-29 9:57 ` ams at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: burnus at gcc dot gnu.org @ 2024-01-28 19:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113615
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ams at gcc dot gnu.org
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
> I'm seeing a lot of ICEs like this when running libgomp testsuite with
> offloading for gfx1030.
I wonder why Andrew S didn't see them (unless he did?). However, I did get a
similar/the same ICE for the testcase in PR113645.
I have not checked whether anything below applies to the PR as well or not but
as Andrew P has marked it as duplicate ...
* * *
Regarding PR113645: While, I have no real idea about GCC backend handling, the
following SEEMS TO FIX THE ISSUE for the ICE of the testcase with -O3 and
gfx1030 and gfx1100, also known as
possible patch:
--- a/gcc/config/gcn/gcn-valu.md
+++ b/gcc/config/gcn/gcn-valu.md
@@ -4273,9 +4273,10 @@
(define_expand "fold_left_plus_<mode>"
[(match_operand:<SCALAR_MODE> 0 "register_operand")
(match_operand:<SCALAR_MODE> 1 "gcn_alu_operand")
(match_operand:V_FP 2 "gcn_alu_operand")]
- "can_create_pseudo_p ()
+ "!TARGET_RDNA2_PLUS
+ && can_create_pseudo_p ()
&& (flag_openacc || flag_openmp
|| flag_associative_math)"
{
rtx dest = operands[0];
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/113615] internal compiler error: in extract_insn, at recog.cc:2812
2024-01-26 10:53 [Bug target/113615] New: internal compiler error: in extract_insn, at recog.cc:2812 rguenth at gcc dot gnu.org
2024-01-28 19:06 ` [Bug target/113615] " pinskia at gcc dot gnu.org
2024-01-28 19:37 ` burnus at gcc dot gnu.org
@ 2024-01-29 9:57 ` ams at gcc dot gnu.org
2024-01-29 10:37 ` burnus at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: ams at gcc dot gnu.org @ 2024-01-29 9:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113615
--- Comment #3 from Andrew Stubbs <ams at gcc dot gnu.org> ---
I did see these, but I hadn't had time to chase them up.
The proposed patch is exactly the sort of solution I was expecting to find,
short term. Have you confirmed that it fixes all the cases?
A proper solution is to find out how to implement reductions with the RDNA ISA,
of course, but that's probably non-trivial (as in, I'm pretty sure it's more
than renaming a few mnemonics), and low-priority as GCC does a reasonably good
job without them.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/113615] internal compiler error: in extract_insn, at recog.cc:2812
2024-01-26 10:53 [Bug target/113615] New: internal compiler error: in extract_insn, at recog.cc:2812 rguenth at gcc dot gnu.org
` (2 preceding siblings ...)
2024-01-29 9:57 ` ams at gcc dot gnu.org
@ 2024-01-29 10:37 ` burnus at gcc dot gnu.org
2024-01-29 12:52 ` cvs-commit at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: burnus at gcc dot gnu.org @ 2024-01-29 10:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113615
--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Patch:
https://gcc.gnu.org/pipermail/gcc-patches/2024-January/644181.html
It fixes this issue but two other kind of issues I still see for gfx1100.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/113615] internal compiler error: in extract_insn, at recog.cc:2812
2024-01-26 10:53 [Bug target/113615] New: internal compiler error: in extract_insn, at recog.cc:2812 rguenth at gcc dot gnu.org
` (3 preceding siblings ...)
2024-01-29 10:37 ` burnus at gcc dot gnu.org
@ 2024-01-29 12:52 ` cvs-commit at gcc dot gnu.org
2024-02-02 13:05 ` doko at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-01-29 12:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113615
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tobias Burnus <burnus@gcc.gnu.org>:
https://gcc.gnu.org/g:7cc2262ec9a410dc56d1c1c6b950c922e14f621d
commit r14-8493-g7cc2262ec9a410dc56d1c1c6b950c922e14f621d
Author: Tobias Burnus <tburnus@baylibre.com>
Date: Mon Jan 29 13:51:25 2024 +0100
gcn/gcn-valu.md: Disable fold_left_plus for TARGET_RDNA2_PLUS [PR113615]
gcc/ChangeLog:
PR target/113615
* config/gcn/gcn-valu.md (fold_left_plus_<mode>): Only
define for !TARGET_RDNA2_PLUS.
Signed-off-by: Tobias Burnus <tburnus@baylibre.com>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/113615] internal compiler error: in extract_insn, at recog.cc:2812
2024-01-26 10:53 [Bug target/113615] New: internal compiler error: in extract_insn, at recog.cc:2812 rguenth at gcc dot gnu.org
` (4 preceding siblings ...)
2024-01-29 12:52 ` cvs-commit at gcc dot gnu.org
@ 2024-02-02 13:05 ` doko at gcc dot gnu.org
2024-02-02 13:09 ` [Bug target/113615] [14 Regression] " jakub at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: doko at gcc dot gnu.org @ 2024-02-02 13:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113615
Matthias Klose <doko at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |doko at gcc dot gnu.org
--- Comment #6 from Matthias Klose <doko at gcc dot gnu.org> ---
Created attachment 57290
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57290&action=edit
preprocessed source
see with trunk 20240131 building a cross compiler targeting alpha-linux-gnu,
attaching the preprocessed source. this worked with trunk 20240129.
// ../../../../../src/libstdc++-v3/src/c++17/floating_to_chars.cc: In function
'std::to_chars_result std::__floating_to_chars_shortest(char*, char*, T,
chars_format) [with T = double]':
// ../../../../../src/libstdc++-v3/src/c++17/floating_to_chars.cc:1306:3:
error: unrecognizable insn:
// 1306 | }
// | ^
// (insn 712 711 713 22 (set (reg:DI 686 [ highparttmp_857 ])
// (truncate:DI (lshiftrt:TI (mult:TI (zero_extend:TI (subreg:DI
(reg:TI 223 [ _319 ]) 0))
// (subreg:DI (reg:TI 225 [ _321 ]) 0))
// (const_int 64 [0x40]))))
"../../../../../src/libstdc++-v3/src/c++17/ryu/d2s_intrinsics.h":254:27 -1
// (nil))
// during RTL pass: vregs
// ../../../../../src/libstdc++-v3/src/c++17/floating_to_chars.cc:1306:3:
internal compiler error: in extract_insn, at recog.cc:2812
// 0x7b030c _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
// ../../src/gcc/rtl-error.cc:108
// 0x7b0328 _fatal_insn_not_found(rtx_def const*, char const*, int, char
const*)
// ../../src/gcc/rtl-error.cc:116
// 0x7aed6e extract_insn(rtx_insn*)
// ../../src/gcc/recog.cc:2812
// 0xe44cd5 instantiate_virtual_regs_in_insn
// ../../src/gcc/function.cc:1611
// 0xe44cd5 instantiate_virtual_regs
// ../../src/gcc/function.cc:1994
// 0xe44cd5 execute
// ../../src/gcc/function.cc:2041
// Please submit a full bug report, with preprocessed source (by using
-freport-bug).
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/113615] [14 Regression] internal compiler error: in extract_insn, at recog.cc:2812
2024-01-26 10:53 [Bug target/113615] New: internal compiler error: in extract_insn, at recog.cc:2812 rguenth at gcc dot gnu.org
` (5 preceding siblings ...)
2024-02-02 13:05 ` doko at gcc dot gnu.org
@ 2024-02-02 13:09 ` jakub at gcc dot gnu.org
2024-02-02 13:20 ` [Bug target/113615] " doko at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-02-02 13:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113615
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Matthias Klose from comment #6)
> Created attachment 57290 [details]
> preprocessed source
>
> see with trunk 20240131 building a cross compiler targeting alpha-linux-gnu,
> attaching the preprocessed source. this worked with trunk 20240129.
How is this related to the gcn bug?
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/113615] internal compiler error: in extract_insn, at recog.cc:2812
2024-01-26 10:53 [Bug target/113615] New: internal compiler error: in extract_insn, at recog.cc:2812 rguenth at gcc dot gnu.org
` (6 preceding siblings ...)
2024-02-02 13:09 ` [Bug target/113615] [14 Regression] " jakub at gcc dot gnu.org
@ 2024-02-02 13:20 ` doko at gcc dot gnu.org
2024-02-09 13:16 ` rguenth at gcc dot gnu.org
2024-02-19 17:04 ` cvs-commit at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: doko at gcc dot gnu.org @ 2024-02-02 13:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113615
Matthias Klose <doko at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[14 Regression] internal |internal compiler error: in
|compiler error: in |extract_insn, at
|extract_insn, at |recog.cc:2812
|recog.cc:2812 |
--- Comment #8 from Matthias Klose <doko at gcc dot gnu.org> ---
filed PR113720 for the alpha-linux-gnu ICE
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/113615] internal compiler error: in extract_insn, at recog.cc:2812
2024-01-26 10:53 [Bug target/113615] New: internal compiler error: in extract_insn, at recog.cc:2812 rguenth at gcc dot gnu.org
` (7 preceding siblings ...)
2024-02-02 13:20 ` [Bug target/113615] " doko at gcc dot gnu.org
@ 2024-02-09 13:16 ` rguenth at gcc dot gnu.org
2024-02-19 17:04 ` cvs-commit at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-02-09 13:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113615
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
This seems fixed now.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/113615] internal compiler error: in extract_insn, at recog.cc:2812
2024-01-26 10:53 [Bug target/113615] New: internal compiler error: in extract_insn, at recog.cc:2812 rguenth at gcc dot gnu.org
` (8 preceding siblings ...)
2024-02-09 13:16 ` rguenth at gcc dot gnu.org
@ 2024-02-19 17:04 ` cvs-commit at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-02-19 17:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113615
--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Thomas Schwinge <tschwinge@gcc.gnu.org>:
https://gcc.gnu.org/g:641b50bffc06123853a1421c0dd5a318c353fd85
commit r14-9068-g641b50bffc06123853a1421c0dd5a318c353fd85
Author: Thomas Schwinge <tschwinge@baylibre.com>
Date: Fri Feb 16 13:04:00 2024 +0100
GCN: Conditionalize 'define_expand "reduc_<fexpander>_scal_<mode>"' on
'!TARGET_RDNA2_PLUS' [PR113615]
On top of commit c7ec7bd1c6590cf4eed267feab490288e0b8d691
"amdgcn: add -march=gfx1030 EXPERIMENTAL" conditionalizing
'define_expand "reduc_<reduc_op>_scal_<mode>"' on
'!TARGET_RDNA2' (later: '!TARGET_RDNA2_PLUS'), we then did similar in
commit 7cc2262ec9a410dc56d1c1c6b950c922e14f621d
"gcn/gcn-valu.md: Disable fold_left_plus for TARGET_RDNA2_PLUS [PR113615]"
to conditionalize 'define_expand "fold_left_plus_<mode>"' on
'!TARGET_RDNA2_PLUS', but I found we also need to conditionalize the
related
'define_expand "reduc_<fexpander>_scal_<mode>"' on '!TARGET_RDNA2_PLUS', to
avoid ICEs like:
[...]/gcc.dg/vect/pr108608.c: In function 'foo':
[...]/gcc.dg/vect/pr108608.c:9:1: error: unrecognizable insn:
(insn 34 33 35 2 (set (reg:V64DF 723)
(unspec:V64DF [
(reg:V64DF 690 [ vect_m_11.20 ])
(const_int 1 [0x1])
] UNSPEC_MOV_DPP_SHR)) -1
(nil))
during RTL pass: vregs
Similar for 'gcc.dg/vect/vect-fmax-2.c', 'gcc.dg/vect/vect-fmin-2.c', and
'UNSPEC_SMAX_DPP_SHR' for 'gcc.dg/vect/vect-fmax-1.c', and
'UNSPEC_SMIN_DPP_SHR' for 'gcc.dg/vect/vect-fmin-1.c', when running
'vect.exp'
for 'check-gcc-c'.
PR target/113615
gcc/
* config/gcn/gcn-valu.md (define_expand
"reduc_<fexpander>_scal_<mode>"):
Conditionalize on '!TARGET_RDNA2_PLUS'.
* config/gcn/gcn.cc (gcn_expand_dpp_shr_insn)
(gcn_expand_reduc_scalar):
'gcc_checking_assert (!TARGET_RDNA2_PLUS);'.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2024-02-19 17:04 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-26 10:53 [Bug target/113615] New: internal compiler error: in extract_insn, at recog.cc:2812 rguenth at gcc dot gnu.org
2024-01-28 19:06 ` [Bug target/113615] " pinskia at gcc dot gnu.org
2024-01-28 19:37 ` burnus at gcc dot gnu.org
2024-01-29 9:57 ` ams at gcc dot gnu.org
2024-01-29 10:37 ` burnus at gcc dot gnu.org
2024-01-29 12:52 ` cvs-commit at gcc dot gnu.org
2024-02-02 13:05 ` doko at gcc dot gnu.org
2024-02-02 13:09 ` [Bug target/113615] [14 Regression] " jakub at gcc dot gnu.org
2024-02-02 13:20 ` [Bug target/113615] " doko at gcc dot gnu.org
2024-02-09 13:16 ` rguenth at gcc dot gnu.org
2024-02-19 17:04 ` cvs-commit 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).