public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/103484] New: [12 Regression] ICE: in ix86_attr_length_immediate_default, at config/i386/i386.c:16686 with -O2 -fno-tree-bit-ccp
@ 2021-11-30 6:34 zsojka at seznam dot cz
2021-11-30 7:07 ` [Bug target/103484] " rguenth at gcc dot gnu.org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: zsojka at seznam dot cz @ 2021-11-30 6:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103484
Bug ID: 103484
Summary: [12 Regression] ICE: in
ix86_attr_length_immediate_default, at
config/i386/i386.c:16686 with -O2 -fno-tree-bit-ccp
Product: gcc
Version: 12.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: x86_64-pc-linux-gnu
Created attachment 51904
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51904&action=edit
reduced testcase
This happens even after the PR103463 fix.
Compiler output:
$ x86_64-pc-linux-gnu-gcc -O2 -fno-tree-bit-ccp testcase.c
during RTL pass: sched2
testcase.c: In function 'foo':
testcase.c:11:1: internal compiler error: in
ix86_attr_length_immediate_default, at config/i386/i386.c:16686
11 | }
| ^
0x81a047 ix86_attr_length_immediate_default(rtx_insn*, bool)
/repo/gcc-trunk/gcc/config/i386/i386.c:16686
0x1ae7af8 insn_default_length(rtx_insn*)
/repo/gcc-trunk/gcc/config/i386/i386.md:19335
0x16d4360 ix86_min_insn_size(rtx_insn*)
/repo/gcc-trunk/gcc/config/i386/i386.c:21517
0x176fee0 core2i7_first_cycle_multipass_filter_ready_try
/repo/gcc-trunk/gcc/config/i386/x86-tune-sched-core.c:107
0x22e8a1f max_issue(ready_list*, int, void*, bool, int*)
/repo/gcc-trunk/gcc/haifa-sched.c:5952
0x22e92e6 choose_ready
/repo/gcc-trunk/gcc/haifa-sched.c:6189
0x22f4a9b schedule_block(basic_block_def**, void*)
/repo/gcc-trunk/gcc/haifa-sched.c:6806
0x130954f schedule_region
/repo/gcc-trunk/gcc/sched-rgn.c:3179
0x130954f schedule_insns()
/repo/gcc-trunk/gcc/sched-rgn.c:3518
0x1309a6d schedule_insns()
/repo/gcc-trunk/gcc/sched-rgn.c:3504
0x1309a6d rest_of_handle_sched2
/repo/gcc-trunk/gcc/sched-rgn.c:3742
0x1309a6d execute
/repo/gcc-trunk/gcc/sched-rgn.c:3878
Please submit a full bug report,
with preprocessed source if appropriate.
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/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r12-5590-20211129212232-g6c7d489a1e6-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/12.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
--disable-bootstrap --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-r12-5590-20211129212232-g6c7d489a1e6-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.0 20211130 (experimental) (GCC)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/103484] [12 Regression] ICE: in ix86_attr_length_immediate_default, at config/i386/i386.c:16686 with -O2 -fno-tree-bit-ccp
2021-11-30 6:34 [Bug target/103484] New: [12 Regression] ICE: in ix86_attr_length_immediate_default, at config/i386/i386.c:16686 with -O2 -fno-tree-bit-ccp zsojka at seznam dot cz
@ 2021-11-30 7:07 ` rguenth at gcc dot gnu.org
2021-11-30 8:36 ` crazylht at gmail dot com
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-30 7:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103484
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
Target Milestone|--- |12.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/103484] [12 Regression] ICE: in ix86_attr_length_immediate_default, at config/i386/i386.c:16686 with -O2 -fno-tree-bit-ccp
2021-11-30 6:34 [Bug target/103484] New: [12 Regression] ICE: in ix86_attr_length_immediate_default, at config/i386/i386.c:16686 with -O2 -fno-tree-bit-ccp zsojka at seznam dot cz
2021-11-30 7:07 ` [Bug target/103484] " rguenth at gcc dot gnu.org
@ 2021-11-30 8:36 ` crazylht at gmail dot com
2021-11-30 11:24 ` aldyh at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: crazylht at gmail dot com @ 2021-11-30 8:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103484
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> ---
(In reply to Zdenek Sojka from comment #0)
> Created attachment 51904 [details]
> reduced testcase
>
> This happens even after the PR103463 fix.
>
PR103463 is not fixed, it just happen not to generate the problematic insn.
I've root caused the issue, and testing a patch.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/103484] [12 Regression] ICE: in ix86_attr_length_immediate_default, at config/i386/i386.c:16686 with -O2 -fno-tree-bit-ccp
2021-11-30 6:34 [Bug target/103484] New: [12 Regression] ICE: in ix86_attr_length_immediate_default, at config/i386/i386.c:16686 with -O2 -fno-tree-bit-ccp zsojka at seznam dot cz
2021-11-30 7:07 ` [Bug target/103484] " rguenth at gcc dot gnu.org
2021-11-30 8:36 ` crazylht at gmail dot com
@ 2021-11-30 11:24 ` aldyh at gcc dot gnu.org
2021-11-30 19:02 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: aldyh at gcc dot gnu.org @ 2021-11-30 11:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103484
Aldy Hernandez <aldyh at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2021-11-30
Status|UNCONFIRMED |NEW
CC| |aldyh at gcc dot gnu.org
--- Comment #2 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
Confirmed.
(gdb) p debug(insn)
(insn 26 61 62 2 (parallel [
(set (reg:DI 0 ax [orig:99 _2 ] [99])
(ior:DI (lshiftrt:DI (reg:DI 0 ax [orig:99 _2 ] [99])
(const_int 0 [0]))
(subreg:DI (ashift:TI (zero_extend:TI (reg:DI 1 dx
[orig:102 _2+8 ] [102]))
(const_int 64 [0x40])) 0)))
(clobber (reg:CC 17 flags))
]) "a.c":10:38 731 {*x86_64_shrd_1}
(expr_list:REG_UNUSED (reg:CC 17 flags)
(expr_list:REG_EQUAL (subreg:DI (ashift:TI (zero_extend:TI (reg:DI 1 dx
[orig:102 _2+8 ] [102]))
(const_int 64 [0x40])) 0)
(nil))))
$3 = void
(gdb) p len
$4 = 1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/103484] [12 Regression] ICE: in ix86_attr_length_immediate_default, at config/i386/i386.c:16686 with -O2 -fno-tree-bit-ccp
2021-11-30 6:34 [Bug target/103484] New: [12 Regression] ICE: in ix86_attr_length_immediate_default, at config/i386/i386.c:16686 with -O2 -fno-tree-bit-ccp zsojka at seznam dot cz
` (2 preceding siblings ...)
2021-11-30 11:24 ` aldyh at gcc dot gnu.org
@ 2021-11-30 19:02 ` jakub at gcc dot gnu.org
2021-11-30 19:18 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-11-30 19:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103484
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 51909
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51909&action=edit
gcc12-pr103484.patch
This one is my fault.
Untested fix.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/103484] [12 Regression] ICE: in ix86_attr_length_immediate_default, at config/i386/i386.c:16686 with -O2 -fno-tree-bit-ccp
2021-11-30 6:34 [Bug target/103484] New: [12 Regression] ICE: in ix86_attr_length_immediate_default, at config/i386/i386.c:16686 with -O2 -fno-tree-bit-ccp zsojka at seznam dot cz
` (3 preceding siblings ...)
2021-11-30 19:02 ` jakub at gcc dot gnu.org
@ 2021-11-30 19:18 ` jakub at gcc dot gnu.org
2021-11-30 23:39 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-11-30 19:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103484
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Oops, seems Hongtao posted the same patch in the other PR. Will test it but
defer to him.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/103484] [12 Regression] ICE: in ix86_attr_length_immediate_default, at config/i386/i386.c:16686 with -O2 -fno-tree-bit-ccp
2021-11-30 6:34 [Bug target/103484] New: [12 Regression] ICE: in ix86_attr_length_immediate_default, at config/i386/i386.c:16686 with -O2 -fno-tree-bit-ccp zsojka at seznam dot cz
` (4 preceding siblings ...)
2021-11-30 19:18 ` jakub at gcc dot gnu.org
@ 2021-11-30 23:39 ` cvs-commit at gcc dot gnu.org
2021-12-01 0:52 ` crazylht at gmail dot com
2021-12-06 12:22 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-11-30 23:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103484
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by hongtao Liu <liuhongt@gcc.gnu.org>:
https://gcc.gnu.org/g:f5e2f2d0ad1b293c534338a72094926313e12039
commit r12-5647-gf5e2f2d0ad1b293c534338a72094926313e12039
Author: liuhongt <hongtao.liu@intel.com>
Date: Tue Nov 30 16:24:39 2021 +0800
Fix ICE in ix86_attr_length_immediate_default.
ix86_attr_length_immediate_default assume TYPE ishift only have 1
constant operand,
but *x86_64_shld_1/*x86_shld_1/*x86_64_shrd_1/*x86_shrd_1 has 2, with
condition: INTVAL (operands[3]) == 32 - INTVAL (operands[2]) or
INTVAL (operands[3]) == 64 - INTVAL (operands[2]), and hit
gcc_assert.
Explicitly set_attr length_immediate for these patterns.
gcc/ChangeLog:
PR target/103463
PR target/103484
* config/i386/i386.md (*x86_64_shld_1): Set_attr
length_immediate to 1.
(*x86_shld_1): Ditto.
(*x86_64_shrd_1): Ditto.
(*x86_shrd_1): Ditto.
gcc/testsuite/ChangeLog:
* gcc.target/i386/pr103463.c: New test.
* gcc.target/i386/pr103463-2.c: New test.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/103484] [12 Regression] ICE: in ix86_attr_length_immediate_default, at config/i386/i386.c:16686 with -O2 -fno-tree-bit-ccp
2021-11-30 6:34 [Bug target/103484] New: [12 Regression] ICE: in ix86_attr_length_immediate_default, at config/i386/i386.c:16686 with -O2 -fno-tree-bit-ccp zsojka at seznam dot cz
` (5 preceding siblings ...)
2021-11-30 23:39 ` cvs-commit at gcc dot gnu.org
@ 2021-12-01 0:52 ` crazylht at gmail dot com
2021-12-06 12:22 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: crazylht at gmail dot com @ 2021-12-01 0:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103484
--- Comment #6 from Hongtao.liu <crazylht at gmail dot com> ---
Fixed in GCC12.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/103484] [12 Regression] ICE: in ix86_attr_length_immediate_default, at config/i386/i386.c:16686 with -O2 -fno-tree-bit-ccp
2021-11-30 6:34 [Bug target/103484] New: [12 Regression] ICE: in ix86_attr_length_immediate_default, at config/i386/i386.c:16686 with -O2 -fno-tree-bit-ccp zsojka at seznam dot cz
` (6 preceding siblings ...)
2021-12-01 0:52 ` crazylht at gmail dot com
@ 2021-12-06 12:22 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-12-06 12:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103484
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Assignee|jakub at gcc dot gnu.org |liuhongt at gcc dot gnu.org
Status|ASSIGNED |RESOLVED
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-12-06 12:22 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-30 6:34 [Bug target/103484] New: [12 Regression] ICE: in ix86_attr_length_immediate_default, at config/i386/i386.c:16686 with -O2 -fno-tree-bit-ccp zsojka at seznam dot cz
2021-11-30 7:07 ` [Bug target/103484] " rguenth at gcc dot gnu.org
2021-11-30 8:36 ` crazylht at gmail dot com
2021-11-30 11:24 ` aldyh at gcc dot gnu.org
2021-11-30 19:02 ` jakub at gcc dot gnu.org
2021-11-30 19:18 ` jakub at gcc dot gnu.org
2021-11-30 23:39 ` cvs-commit at gcc dot gnu.org
2021-12-01 0:52 ` crazylht at gmail dot com
2021-12-06 12:22 ` jakub 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).