public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/108589] New: ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1932 with -mtune=ampere1a -fno-split-wide-types
@ 2023-01-29 8:40 zsojka at seznam dot cz
2023-01-30 4:26 ` [Bug target/108589] " pinskia at gcc dot gnu.org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: zsojka at seznam dot cz @ 2023-01-29 8:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108589
Bug ID: 108589
Summary: ICE: RTL check: expected code 'reg', have 'subreg' in
rhs_regno, at rtl.h:1932 with -mtune=ampere1a
-fno-split-wide-types
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: zsojka at seznam dot cz
Target Milestone: ---
Host: x86_64-pc-linux-gnu
Target: aarch64-unknown-linux-gnu
Created attachment 54369
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54369&action=edit
reduced testcase
This might need RTL checking enabled.
Compiler output:
$ aarch64-unknown-linux-gnu-gcc -O2 -mtune=ampere1a -fno-split-wide-types
testcase.c
during RTL pass: sched1
testcase.c: In function 'foo':
testcase.c:11:1: internal compiler error: RTL check: expected code 'reg', have
'subreg' in rhs_regno, at rtl.h:1932
11 | }
| ^
0x7d1279 rtl_check_failed_code1(rtx_def const*, rtx_code, char const*, int,
char const*)
/repo/gcc-trunk/gcc/rtl.cc:916
0x877f1a rhs_regno
/repo/gcc-trunk/gcc/rtl.h:1932
0x87c0b2 rhs_regno
/repo/gcc-trunk/gcc/config/aarch64/aarch64.cc:25511
0x87c0b2 aarch_macro_fusion_pair_p
/repo/gcc-trunk/gcc/config/aarch64/aarch64.cc:25707
0x1fca135 sched_macro_fuse_insns
/repo/gcc-trunk/gcc/sched-deps.cc:2852
0x1fca135 sched_analyze_insn
/repo/gcc-trunk/gcc/sched-deps.cc:2891
0x1fcad29 deps_analyze_insn(deps_desc*, rtx_insn*)
/repo/gcc-trunk/gcc/sched-deps.cc:3683
0x1fcdf9c sched_analyze(deps_desc*, rtx_insn*, rtx_insn*)
/repo/gcc-trunk/gcc/sched-deps.cc:3836
0x112a3d1 compute_block_dependences
/repo/gcc-trunk/gcc/sched-rgn.cc:2733
0x112a3d1 sched_rgn_compute_dependencies(int)
/repo/gcc-trunk/gcc/sched-rgn.cc:3369
0x112ccb8 schedule_region
/repo/gcc-trunk/gcc/sched-rgn.cc:3134
0x112ccb8 schedule_insns()
/repo/gcc-trunk/gcc/sched-rgn.cc:3527
0x112d32c schedule_insns()
/repo/gcc-trunk/gcc/sched-rgn.cc:3513
0x112d32c rest_of_handle_sched
/repo/gcc-trunk/gcc/sched-rgn.cc:3731
0x112d32c execute
/repo/gcc-trunk/gcc/sched-rgn.cc:3841
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.
$ aarch64-unknown-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-aarch64/bin/aarch64-unknown-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r13-5461-20230127201120-g815e5740162-checking-yes-rtl-df-extra-aarch64/bin/../libexec/gcc/aarch64-unknown-linux-gnu/13.0.1/lto-wrapper
Target: aarch64-unknown-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--with-cloog --with-ppl --with-isl
--with-sysroot=/usr/aarch64-unknown-linux-gnu --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=aarch64-unknown-linux-gnu
--with-ld=/usr/bin/aarch64-unknown-linux-gnu-ld
--with-as=/usr/bin/aarch64-unknown-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r13-5461-20230127201120-g815e5740162-checking-yes-rtl-df-extra-aarch64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.0.1 20230127 (experimental) (GCC)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/108589] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1932 with -mtune=ampere1a -fno-split-wide-types
2023-01-29 8:40 [Bug target/108589] New: ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1932 with -mtune=ampere1a -fno-split-wide-types zsojka at seznam dot cz
@ 2023-01-30 4:26 ` pinskia at gcc dot gnu.org
2023-01-30 11:08 ` ptomsich at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-01-30 4:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108589
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2023-01-30
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Introduced when -mcpu=ampere1a support was added in r13-4018-g590a06afbf0e96.
The issue is obvious:
+ if (GET_CODE (curr_src) == PLUS
+ && (GET_CODE (prev_src) == PLUS || GET_CODE (prev_src) == MINUS)
+ && CONST_INT_P (XEXP (curr_src, 1))
+ && INTVAL (XEXP (curr_src, 1)) == polarity
+ && REG_P (XEXP (curr_src, 0))
+ && REGNO (SET_DEST (prev_set)) == REGNO (XEXP (curr_src, 0)))
+ return true;
There is no check to make sure SET_DEST was a REG_P.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/108589] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1932 with -mtune=ampere1a -fno-split-wide-types
2023-01-29 8:40 [Bug target/108589] New: ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1932 with -mtune=ampere1a -fno-split-wide-types zsojka at seznam dot cz
2023-01-30 4:26 ` [Bug target/108589] " pinskia at gcc dot gnu.org
@ 2023-01-30 11:08 ` ptomsich at gcc dot gnu.org
2023-01-30 22:11 ` ptomsich at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: ptomsich at gcc dot gnu.org @ 2023-01-30 11:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108589
ptomsich at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |ptomsich at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #2 from ptomsich at gcc dot gnu.org ---
We'll handle this one.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/108589] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1932 with -mtune=ampere1a -fno-split-wide-types
2023-01-29 8:40 [Bug target/108589] New: ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1932 with -mtune=ampere1a -fno-split-wide-types zsojka at seznam dot cz
2023-01-30 4:26 ` [Bug target/108589] " pinskia at gcc dot gnu.org
2023-01-30 11:08 ` ptomsich at gcc dot gnu.org
@ 2023-01-30 22:11 ` ptomsich at gcc dot gnu.org
2023-01-31 15:34 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: ptomsich at gcc dot gnu.org @ 2023-01-30 22:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108589
--- Comment #3 from ptomsich at gcc dot gnu.org ---
I can confirm that the issue reproduces (as expected) with the
'--enable-checking=rtl' configuration. I'll retest the fix and submit via the
list.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/108589] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1932 with -mtune=ampere1a -fno-split-wide-types
2023-01-29 8:40 [Bug target/108589] New: ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1932 with -mtune=ampere1a -fno-split-wide-types zsojka at seznam dot cz
` (2 preceding siblings ...)
2023-01-30 22:11 ` ptomsich at gcc dot gnu.org
@ 2023-01-31 15:34 ` cvs-commit at gcc dot gnu.org
2023-04-18 0:08 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-01-31 15:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108589
--- Comment #4 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:a39c6ec97906766ad65d15d4856fd41121ee7a45
commit r13-5581-ga39c6ec97906766ad65d15d4856fd41121ee7a45
Author: Philipp Tomsich <philipp.tomsich@vrull.eu>
Date: Mon Jan 30 23:40:26 2023 +0100
PR target/108589 - Check REG_P for AARCH64_FUSE_ADDSUB_2REG_CONST1
This adds a check for REG_P on SET_DEST for the new idiom recognizer
for AARCH64_FUSE_ADDSUB_2REG_CONST1. The reported ICE is only
observable with checking=rtl.
Bootstrapped/regtested aarch64-linux, committed.
PR target/108589
gcc/ChangeLog:
* config/aarch64/aarch64.cc (aarch_macro_fusion_pair_p): Check
REG_P on SET_DEST.
gcc/testsuite/ChangeLog:
* gcc.target/aarch64/pr108589.c: New test.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/108589] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1932 with -mtune=ampere1a -fno-split-wide-types
2023-01-29 8:40 [Bug target/108589] New: ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1932 with -mtune=ampere1a -fno-split-wide-types zsojka at seznam dot cz
` (3 preceding siblings ...)
2023-01-31 15:34 ` cvs-commit at gcc dot gnu.org
@ 2023-04-18 0:08 ` cvs-commit at gcc dot gnu.org
2023-04-18 0:09 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-04-18 0:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108589
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Philipp Tomsich
<ptomsich@gcc.gnu.org>:
https://gcc.gnu.org/g:0f7ca8a3f50b0c34183a92a1b6c15ff5aacbf449
commit r12-9418-g0f7ca8a3f50b0c34183a92a1b6c15ff5aacbf449
Author: Philipp Tomsich <philipp.tomsich@vrull.eu>
Date: Mon Jan 30 23:40:26 2023 +0100
PR target/108589 - Check REG_P for AARCH64_FUSE_ADDSUB_2REG_CONST1
This adds a check for REG_P on SET_DEST for the new idiom recognizer
for AARCH64_FUSE_ADDSUB_2REG_CONST1. The reported ICE is only
observable with checking=rtl.
Bootstrapped/regtested aarch64-linux, committed.
PR target/108589
gcc/ChangeLog:
* config/aarch64/aarch64.cc (aarch_macro_fusion_pair_p): Check
REG_P on SET_DEST.
gcc/testsuite/ChangeLog:
* gcc.target/aarch64/pr108589.c: New test.
(cherry picked from commit a39c6ec97906766ad65d15d4856fd41121ee7a45)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/108589] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1932 with -mtune=ampere1a -fno-split-wide-types
2023-01-29 8:40 [Bug target/108589] New: ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1932 with -mtune=ampere1a -fno-split-wide-types zsojka at seznam dot cz
` (4 preceding siblings ...)
2023-04-18 0:08 ` cvs-commit at gcc dot gnu.org
@ 2023-04-18 0:09 ` cvs-commit at gcc dot gnu.org
2023-04-18 0:38 ` cvs-commit at gcc dot gnu.org
2023-05-09 8:26 ` ptomsich at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-04-18 0:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108589
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Philipp Tomsich
<ptomsich@gcc.gnu.org>:
https://gcc.gnu.org/g:b54061569221e678e99e9e49dc0ac79228d9c407
commit r11-10634-gb54061569221e678e99e9e49dc0ac79228d9c407
Author: Philipp Tomsich <philipp.tomsich@vrull.eu>
Date: Mon Jan 30 23:40:26 2023 +0100
PR target/108589 - Check REG_P for AARCH64_FUSE_ADDSUB_2REG_CONST1
This adds a check for REG_P on SET_DEST for the new idiom recognizer
for AARCH64_FUSE_ADDSUB_2REG_CONST1. The reported ICE is only
observable with checking=rtl.
Bootstrapped/regtested aarch64-linux, committed.
PR target/108589
gcc/ChangeLog:
* config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Check
REG_P on SET_DEST.
gcc/testsuite/ChangeLog:
* gcc.target/aarch64/pr108589.c: New test.
(cherry picked from commit a39c6ec97906766ad65d15d4856fd41121ee7a45)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/108589] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1932 with -mtune=ampere1a -fno-split-wide-types
2023-01-29 8:40 [Bug target/108589] New: ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1932 with -mtune=ampere1a -fno-split-wide-types zsojka at seznam dot cz
` (5 preceding siblings ...)
2023-04-18 0:09 ` cvs-commit at gcc dot gnu.org
@ 2023-04-18 0:38 ` cvs-commit at gcc dot gnu.org
2023-05-09 8:26 ` ptomsich at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-04-18 0:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108589
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Philipp Tomsich
<ptomsich@gcc.gnu.org>:
https://gcc.gnu.org/g:28fc1297adde1be51f25a13e110d38dd9e804320
commit r10-11299-g28fc1297adde1be51f25a13e110d38dd9e804320
Author: Philipp Tomsich <philipp.tomsich@vrull.eu>
Date: Mon Jan 30 23:40:26 2023 +0100
PR target/108589 - Check REG_P for AARCH64_FUSE_ADDSUB_2REG_CONST1
This adds a check for REG_P on SET_DEST for the new idiom recognizer
for AARCH64_FUSE_ADDSUB_2REG_CONST1. The reported ICE is only
observable with checking=rtl.
Bootstrapped/regtested aarch64-linux, committed.
PR target/108589
gcc/ChangeLog:
* config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Check
REG_P on SET_DEST.
gcc/testsuite/ChangeLog:
* gcc.target/aarch64/pr108589.c: New test.
(cherry picked from commit a39c6ec97906766ad65d15d4856fd41121ee7a45)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/108589] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1932 with -mtune=ampere1a -fno-split-wide-types
2023-01-29 8:40 [Bug target/108589] New: ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1932 with -mtune=ampere1a -fno-split-wide-types zsojka at seznam dot cz
` (6 preceding siblings ...)
2023-04-18 0:38 ` cvs-commit at gcc dot gnu.org
@ 2023-05-09 8:26 ` ptomsich at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: ptomsich at gcc dot gnu.org @ 2023-05-09 8:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108589
ptomsich at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #8 from ptomsich at gcc dot gnu.org ---
Fixes had been commited a while ago.
Marking as RESOLVED.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-05-09 8:26 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-29 8:40 [Bug target/108589] New: ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1932 with -mtune=ampere1a -fno-split-wide-types zsojka at seznam dot cz
2023-01-30 4:26 ` [Bug target/108589] " pinskia at gcc dot gnu.org
2023-01-30 11:08 ` ptomsich at gcc dot gnu.org
2023-01-30 22:11 ` ptomsich at gcc dot gnu.org
2023-01-31 15:34 ` cvs-commit at gcc dot gnu.org
2023-04-18 0:08 ` cvs-commit at gcc dot gnu.org
2023-04-18 0:09 ` cvs-commit at gcc dot gnu.org
2023-04-18 0:38 ` cvs-commit at gcc dot gnu.org
2023-05-09 8:26 ` 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).