public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/105993] New: [13 Regression] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1932 with -O -mxop
@ 2022-06-15 20:36 zsojka at seznam dot cz
2022-06-16 1:20 ` [Bug target/105993] " crazylht at gmail dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: zsojka at seznam dot cz @ 2022-06-15 20:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105993
Bug ID: 105993
Summary: [13 Regression] ICE: RTL check: expected code 'reg',
have 'subreg' in rhs_regno, at rtl.h:1932 with -O
-mxop
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Keywords: ice-checking, 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: x86_64-pc-linux-gnu
Created attachment 53148
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53148&action=edit
reduced testcase
Note this might need a build with RTL checking enabled.
Compiler output:
$ x86_64-pc-linux-gnu-gcc -O -mxop testcase.c
during RTL pass: combine
testcase.c: In function 'foo':
testcase.c:14:1: internal compiler error: RTL check: expected code 'reg', have
'subreg' in rhs_regno, at rtl.h:1932
14 | }
| ^
0x772c96 rtl_check_failed_code1(rtx_def const*, rtx_code, char const*, int,
char const*)
/repo/gcc-trunk/gcc/rtl.cc:916
0xb925cf rhs_regno
/repo/gcc-trunk/gcc/rtl.h:1932
0xb94e27 rhs_regno
/repo/gcc-trunk/gcc/config/i386/sse.md:12506
0xb94e27 split_41
/repo/gcc-trunk/gcc/config/i386/sse.md:23880
0x231fb05 combine_split_insns
/repo/gcc-trunk/gcc/combine.cc:530
0x2327431 try_combine
/repo/gcc-trunk/gcc/combine.cc:3561
0x232a694 combine_instructions
/repo/gcc-trunk/gcc/combine.cc:1287
0x232a694 rest_of_handle_combine
/repo/gcc-trunk/gcc/combine.cc:14976
0x232a694 execute
/repo/gcc-trunk/gcc/combine.cc:15021
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.
$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r13-1112-20220615134935-g49d14a841fd-checking-yes-rtl-df-extra-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/13.0.0/lto-wrapper
Target: x86_64-pc-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 --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
--with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r13-1112-20220615134935-g49d14a841fd-checking-yes-rtl-df-extra-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.0.0 20220615 (experimental) (GCC)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/105993] [13 Regression] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1932 with -O -mxop
2022-06-15 20:36 [Bug target/105993] New: [13 Regression] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1932 with -O -mxop zsojka at seznam dot cz
@ 2022-06-16 1:20 ` crazylht at gmail dot com
2022-06-16 6:38 ` ubizjak at gmail dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: crazylht at gmail dot com @ 2022-06-16 1:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105993
Hongtao.liu <crazylht at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |crazylht at gmail dot com
--- Comment #1 from Hongtao.liu <crazylht at gmail dot com> ---
It looks like there're several places we use REGNO for register_operand before
RA, they're all problematic.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/105993] [13 Regression] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1932 with -O -mxop
2022-06-15 20:36 [Bug target/105993] New: [13 Regression] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1932 with -O -mxop zsojka at seznam dot cz
2022-06-16 1:20 ` [Bug target/105993] " crazylht at gmail dot com
@ 2022-06-16 6:38 ` ubizjak at gmail dot com
2022-06-17 14:23 ` cvs-commit at gcc dot gnu.org
2022-06-17 14:25 ` ubizjak at gmail dot com
3 siblings, 0 replies; 5+ messages in thread
From: ubizjak at gmail dot com @ 2022-06-16 6:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105993
--- Comment #2 from Uroš Bizjak <ubizjak at gmail dot com> ---
Created attachment 53149
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53149&action=edit
Patch to fix the failure
The patch fixes this particular failure by using (match_dup X). In general,
rtx_equal_p should be used before reload (also with register_operand). REGNO on
register_operand is valid only after reload (post-reload splitters and
peephole2 patterns).
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/105993] [13 Regression] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1932 with -O -mxop
2022-06-15 20:36 [Bug target/105993] New: [13 Regression] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1932 with -O -mxop zsojka at seznam dot cz
2022-06-16 1:20 ` [Bug target/105993] " crazylht at gmail dot com
2022-06-16 6:38 ` ubizjak at gmail dot com
@ 2022-06-17 14:23 ` cvs-commit at gcc dot gnu.org
2022-06-17 14:25 ` ubizjak at gmail dot com
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-06-17 14:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105993
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Uros Bizjak <uros@gcc.gnu.org>:
https://gcc.gnu.org/g:1d6044c250e3badfa2a403fee670b295106bf4fc
commit r13-1155-g1d6044c250e3badfa2a403fee670b295106bf4fc
Author: Uros Bizjak <ubizjak@gmail.com>
Date: Fri Jun 17 16:22:20 2022 +0200
i386: Fix VPMOV splitter [PR105993]
REGNO should not be used with register_operand before reload because
subregs of registers or even subregs of memory match the predicate.
The build with RTL checking enabled does not tolerate REGNO with
non-reg operand.
The patch splits the splitter into two related splitters and uses
(match_dup ...) RTXes instead of REGNO comparisons.
2022-06-17 Uroš Bizjak <ubizjak@gmail.com>
gcc/ChangeLog:
PR target/105993
* config/i386/sse.md (vpmov splitter): Use (match_dup ...)
instead of REGNO comparisons in combine splitter.
gcc/testsuite/ChangeLog:
PR target/105993
* gcc.target/i386/pr105993.c: New test.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/105993] [13 Regression] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1932 with -O -mxop
2022-06-15 20:36 [Bug target/105993] New: [13 Regression] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1932 with -O -mxop zsojka at seznam dot cz
` (2 preceding siblings ...)
2022-06-17 14:23 ` cvs-commit at gcc dot gnu.org
@ 2022-06-17 14:25 ` ubizjak at gmail dot com
3 siblings, 0 replies; 5+ messages in thread
From: ubizjak at gmail dot com @ 2022-06-17 14:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105993
Uroš Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Target Milestone|--- |13.0
Status|UNCONFIRMED |RESOLVED
--- Comment #4 from Uroš Bizjak <ubizjak at gmail dot com> ---
Fixed.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-06-17 14:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-15 20:36 [Bug target/105993] New: [13 Regression] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1932 with -O -mxop zsojka at seznam dot cz
2022-06-16 1:20 ` [Bug target/105993] " crazylht at gmail dot com
2022-06-16 6:38 ` ubizjak at gmail dot com
2022-06-17 14:23 ` cvs-commit at gcc dot gnu.org
2022-06-17 14:25 ` ubizjak at gmail 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).