public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/107934] New: ICE: SIGSEGV in immediate_operand (recog.cc:1618) with -O2 -mtune=knl -ffinite-math-only and __bf16
@ 2022-11-30 14:02 zsojka at seznam dot cz
2022-11-30 14:05 ` [Bug target/107934] ICE: SIGSEGV in immediate_operand (recog.cc:1618) with -O2 -mtune=knl -ffinite-math-only and __bf16 since r13-4314-ga1ecc5600464f6a6 marxin at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: zsojka at seznam dot cz @ 2022-11-30 14:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107934
Bug ID: 107934
Summary: ICE: SIGSEGV in immediate_operand (recog.cc:1618) with
-O2 -mtune=knl -ffinite-math-only and __bf16
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: x86_64-pc-linux-gnu
Created attachment 53991
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53991&action=edit
reduced testcase
Compiler output:
$ x86_64-pc-linux-gnu-gcc -O2 -mtune=knl -ffinite-math-only testcase.c -wrapper
valgrind,-q
==28622== Invalid read of size 1
==28622== at 0x12E3F8B: immediate_operand(rtx_def*, machine_mode)
(recog.cc:1618)
==28622== by 0x1FB1F98: insn_default_latency_slm(rtx_insn*) (i386.md:17163)
==28622== by 0x2406941: insn_sched_cost(rtx_insn*) (haifa-sched.cc:1421)
==28622== by 0x240AF22: dep_cost_1(_dep*, unsigned int)
(haifa-sched.cc:1474)
==28622== by 0x240CBE1: dep_cost (haifa-sched.cc:1510)
==28622== by 0x240CBE1: priority(rtx_insn*, bool) [clone .part.0]
(haifa-sched.cc:1661)
==28622== by 0x240D4C2: priority (haifa-sched.cc:1593)
==28622== by 0x240D4C2: set_priorities(rtx_insn*, rtx_insn*)
(haifa-sched.cc:7166)
==28622== by 0x13390D2: compute_priorities() (sched-rgn.cc:3025)
==28622== by 0x133BE05: schedule_region (sched-rgn.cc:3139)
==28622== by 0x133BE05: schedule_insns() [clone .part.0] (sched-rgn.cc:3527)
==28622== by 0x133C4BD: schedule_insns (sched-rgn.cc:3513)
==28622== by 0x133C4BD: rest_of_handle_sched2 (sched-rgn.cc:3751)
==28622== by 0x133C4BD: (anonymous
namespace)::pass_sched2::execute(function*) (sched-rgn.cc:3890)
==28622== by 0x1294BDA: execute_one_pass(opt_pass*) (passes.cc:2644)
==28622== by 0x12954CF: execute_pass_list_1(opt_pass*) (passes.cc:2753)
==28622== by 0x12954E1: execute_pass_list_1(opt_pass*) (passes.cc:2754)
==28622== Address 0xabababababababad is not stack'd, malloc'd or (recently)
free'd
==28622==
during RTL pass: sched2
testcase.c: In function 'foo':
testcase.c:5:1: internal compiler error: Segmentation fault
5 | }
| ^
0x139d15f crash_signal
/repo/gcc-trunk/gcc/toplev.cc:314
0x12e3f8b immediate_operand(rtx_def*, machine_mode)
/repo/gcc-trunk/gcc/recog.cc:1618
0x1fb1f98 insn_default_latency_slm(rtx_insn*)
/repo/gcc-trunk/gcc/config/i386/i386.md:17163
0x2406941 insn_sched_cost(rtx_insn*)
/repo/gcc-trunk/gcc/haifa-sched.cc:1421
0x240af22 dep_cost_1(_dep*, unsigned int)
/repo/gcc-trunk/gcc/haifa-sched.cc:1474
0x240cbe1 dep_cost(_dep*)
/repo/gcc-trunk/gcc/haifa-sched.cc:1510
0x240cbe1 priority
/repo/gcc-trunk/gcc/haifa-sched.cc:1661
0x240d4c2 priority
/repo/gcc-trunk/gcc/haifa-sched.cc:1593
0x240d4c2 set_priorities(rtx_insn*, rtx_insn*)
/repo/gcc-trunk/gcc/haifa-sched.cc:7166
0x13390d2 compute_priorities()
/repo/gcc-trunk/gcc/sched-rgn.cc:3025
0x133be05 schedule_region
/repo/gcc-trunk/gcc/sched-rgn.cc:3139
0x133be05 schedule_insns()
/repo/gcc-trunk/gcc/sched-rgn.cc:3527
0x133c4bd schedule_insns()
/repo/gcc-trunk/gcc/sched-rgn.cc:3513
0x133c4bd rest_of_handle_sched2
/repo/gcc-trunk/gcc/sched-rgn.cc:3751
0x133c4bd execute
/repo/gcc-trunk/gcc/sched-rgn.cc:3890
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-4410-20221130163048-g7c01d029fca-checking-yes-rtl-df-extra-nobootstrap-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
--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-r13-4410-20221130163048-g7c01d029fca-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.0.0 20221130 (experimental) (GCC)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/107934] ICE: SIGSEGV in immediate_operand (recog.cc:1618) with -O2 -mtune=knl -ffinite-math-only and __bf16 since r13-4314-ga1ecc5600464f6a6
2022-11-30 14:02 [Bug target/107934] New: ICE: SIGSEGV in immediate_operand (recog.cc:1618) with -O2 -mtune=knl -ffinite-math-only and __bf16 zsojka at seznam dot cz
@ 2022-11-30 14:05 ` marxin at gcc dot gnu.org
2022-11-30 14:21 ` ubizjak at gmail dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-11-30 14:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107934
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |crazylht at gmail dot com,
| |marxin at gcc dot gnu.org
Summary|ICE: SIGSEGV in |ICE: SIGSEGV in
|immediate_operand |immediate_operand
|(recog.cc:1618) with -O2 |(recog.cc:1618) with -O2
|-mtune=knl |-mtune=knl
|-ffinite-math-only and |-ffinite-math-only and
|__bf16 |__bf16 since
| |r13-4314-ga1ecc5600464f6a6
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Target Milestone|--- |13.0
Last reconfirmed| |2022-11-30
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started likely with r13-4314-ga1ecc5600464f6a6.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/107934] ICE: SIGSEGV in immediate_operand (recog.cc:1618) with -O2 -mtune=knl -ffinite-math-only and __bf16 since r13-4314-ga1ecc5600464f6a6
2022-11-30 14:02 [Bug target/107934] New: ICE: SIGSEGV in immediate_operand (recog.cc:1618) with -O2 -mtune=knl -ffinite-math-only and __bf16 zsojka at seznam dot cz
2022-11-30 14:05 ` [Bug target/107934] ICE: SIGSEGV in immediate_operand (recog.cc:1618) with -O2 -mtune=knl -ffinite-math-only and __bf16 since r13-4314-ga1ecc5600464f6a6 marxin at gcc dot gnu.org
@ 2022-11-30 14:21 ` ubizjak at gmail dot com
2022-12-01 1:45 ` crazylht at gmail dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: ubizjak at gmail dot com @ 2022-11-30 14:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107934
--- Comment #2 from Uroš Bizjak <ubizjak at gmail dot com> ---
The type of extendbfsf2_1 insn should be sseishft1.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/107934] ICE: SIGSEGV in immediate_operand (recog.cc:1618) with -O2 -mtune=knl -ffinite-math-only and __bf16 since r13-4314-ga1ecc5600464f6a6
2022-11-30 14:02 [Bug target/107934] New: ICE: SIGSEGV in immediate_operand (recog.cc:1618) with -O2 -mtune=knl -ffinite-math-only and __bf16 zsojka at seznam dot cz
2022-11-30 14:05 ` [Bug target/107934] ICE: SIGSEGV in immediate_operand (recog.cc:1618) with -O2 -mtune=knl -ffinite-math-only and __bf16 since r13-4314-ga1ecc5600464f6a6 marxin at gcc dot gnu.org
2022-11-30 14:21 ` ubizjak at gmail dot com
@ 2022-12-01 1:45 ` crazylht at gmail dot com
2022-12-02 1:29 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: crazylht at gmail dot com @ 2022-12-01 1:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107934
--- Comment #3 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to Uroš Bizjak from comment #2)
> The type of extendbfsf2_1 insn should be sseishft1.
Yes.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/107934] ICE: SIGSEGV in immediate_operand (recog.cc:1618) with -O2 -mtune=knl -ffinite-math-only and __bf16 since r13-4314-ga1ecc5600464f6a6
2022-11-30 14:02 [Bug target/107934] New: ICE: SIGSEGV in immediate_operand (recog.cc:1618) with -O2 -mtune=knl -ffinite-math-only and __bf16 zsojka at seznam dot cz
` (2 preceding siblings ...)
2022-12-01 1:45 ` crazylht at gmail dot com
@ 2022-12-02 1:29 ` cvs-commit at gcc dot gnu.org
2022-12-02 1:29 ` crazylht at gmail dot com
2022-12-02 9:44 ` marxin at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-12-02 1:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107934
--- Comment #4 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:e055e6db974d8b8950b30859a853e0aee74e20c2
commit r13-4454-ge055e6db974d8b8950b30859a853e0aee74e20c2
Author: liuhongt <hongtao.liu@intel.com>
Date: Thu Dec 1 11:41:49 2022 +0800
Fix ICE due to incorrect insn type.
;; if reg/mem op
(define_insn_reservation "slm_sseishft_3" 2
(and (eq_attr "cpu" "slm")
(and (eq_attr "type" "sseishft")
(not (match_operand 2 "immediate_operand"))))
"slm-complex, slm-all-eu")
in slm.md it will check operands[2] for type sseishft, but for
extendbfsf2_1 there's no second operand which caused ICE.
The patch set type from sseishft to sseishft1 to fix the issue.
gcc/ChangeLog:
PR target/107934
* config/i386/i386.md (extendbfsf2_1): Change type from
sseishft to sseishft1.
gcc/testsuite/ChangeLog:
* gcc.target/i386/pr107934.c: New test.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/107934] ICE: SIGSEGV in immediate_operand (recog.cc:1618) with -O2 -mtune=knl -ffinite-math-only and __bf16 since r13-4314-ga1ecc5600464f6a6
2022-11-30 14:02 [Bug target/107934] New: ICE: SIGSEGV in immediate_operand (recog.cc:1618) with -O2 -mtune=knl -ffinite-math-only and __bf16 zsojka at seznam dot cz
` (3 preceding siblings ...)
2022-12-02 1:29 ` cvs-commit at gcc dot gnu.org
@ 2022-12-02 1:29 ` crazylht at gmail dot com
2022-12-02 9:44 ` marxin at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: crazylht at gmail dot com @ 2022-12-02 1:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107934
--- Comment #5 from Hongtao.liu <crazylht at gmail dot com> ---
Fixed in GCC13.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/107934] ICE: SIGSEGV in immediate_operand (recog.cc:1618) with -O2 -mtune=knl -ffinite-math-only and __bf16 since r13-4314-ga1ecc5600464f6a6
2022-11-30 14:02 [Bug target/107934] New: ICE: SIGSEGV in immediate_operand (recog.cc:1618) with -O2 -mtune=knl -ffinite-math-only and __bf16 zsojka at seznam dot cz
` (4 preceding siblings ...)
2022-12-02 1:29 ` crazylht at gmail dot com
@ 2022-12-02 9:44 ` marxin at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-12-02 9:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107934
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
Let's close it.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-12-02 9:44 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-30 14:02 [Bug target/107934] New: ICE: SIGSEGV in immediate_operand (recog.cc:1618) with -O2 -mtune=knl -ffinite-math-only and __bf16 zsojka at seznam dot cz
2022-11-30 14:05 ` [Bug target/107934] ICE: SIGSEGV in immediate_operand (recog.cc:1618) with -O2 -mtune=knl -ffinite-math-only and __bf16 since r13-4314-ga1ecc5600464f6a6 marxin at gcc dot gnu.org
2022-11-30 14:21 ` ubizjak at gmail dot com
2022-12-01 1:45 ` crazylht at gmail dot com
2022-12-02 1:29 ` cvs-commit at gcc dot gnu.org
2022-12-02 1:29 ` crazylht at gmail dot com
2022-12-02 9:44 ` marxin 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).