public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/107322] New: ICE: in extract_insn, at recog.cc:2791 (unrecognizable insn) with __bf16 compare
@ 2022-10-19 18:39 zsojka at seznam dot cz
2022-10-20 8:44 ` [Bug target/107322] " marxin at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: zsojka at seznam dot cz @ 2022-10-19 18:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107322
Bug ID: 107322
Summary: ICE: in extract_insn, at recog.cc:2791 (unrecognizable
insn) with __bf16 compare
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 53731
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53731&action=edit
reduced testcase
Compiler output:
$ x86_64-pc-linux-gnu-gcc -fexcess-precision=16 -O testcase.c
testcase.c: In function 'foo':
testcase.c:8:1: error: unrecognizable insn:
8 | }
| ^
(insn 7 6 9 2 (set (reg:CCFP 17 flags)
(compare:CCFP (reg:BF 88)
(reg:BF 87))) "testcase.c":7:5 -1
(nil))
during RTL pass: vregs
testcase.c:8:1: internal compiler error: in extract_insn, at recog.cc:2791
0x78376b _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
/repo/gcc-trunk/gcc/rtl-error.cc:108
0x7837e7 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
/repo/gcc-trunk/gcc/rtl-error.cc:116
0x77239c extract_insn(rtx_insn*)
/repo/gcc-trunk/gcc/recog.cc:2791
0x1043ee9 instantiate_virtual_regs_in_insn
/repo/gcc-trunk/gcc/function.cc:1611
0x1043ee9 instantiate_virtual_regs
/repo/gcc-trunk/gcc/function.cc:1985
0x1043ee9 execute
/repo/gcc-trunk/gcc/function.cc:2034
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/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r13-3383-20221019140533-g47684e58edc-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-3383-20221019140533-g47684e58edc-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.0.0 20221019 (experimental) (GCC)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/107322] ICE: in extract_insn, at recog.cc:2791 (unrecognizable insn) with __bf16 compare
2022-10-19 18:39 [Bug target/107322] New: ICE: in extract_insn, at recog.cc:2791 (unrecognizable insn) with __bf16 compare zsojka at seznam dot cz
@ 2022-10-20 8:44 ` marxin at gcc dot gnu.org
2022-10-20 8:52 ` crazylht at gmail dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-10-20 8:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107322
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
CC| |jakub at gcc dot gnu.org,
| |marxin at gcc dot gnu.org
Last reconfirmed| |2022-10-20
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Stared with r13-3292-gc2565a31c1622ab0.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/107322] ICE: in extract_insn, at recog.cc:2791 (unrecognizable insn) with __bf16 compare
2022-10-19 18:39 [Bug target/107322] New: ICE: in extract_insn, at recog.cc:2791 (unrecognizable insn) with __bf16 compare zsojka at seznam dot cz
2022-10-20 8:44 ` [Bug target/107322] " marxin at gcc dot gnu.org
@ 2022-10-20 8:52 ` crazylht at gmail dot com
2022-10-20 10:35 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: crazylht at gmail dot com @ 2022-10-20 8:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107322
--- Comment #2 from Hongtao.liu <crazylht at gmail dot com> ---
Looks fine for _Float16 with same option
int i;
_Float16 f;
void
foo (void)
{
i *= 0 >= f;
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/107322] ICE: in extract_insn, at recog.cc:2791 (unrecognizable insn) with __bf16 compare
2022-10-19 18:39 [Bug target/107322] New: ICE: in extract_insn, at recog.cc:2791 (unrecognizable insn) with __bf16 compare zsojka at seznam dot cz
2022-10-20 8:44 ` [Bug target/107322] " marxin at gcc dot gnu.org
2022-10-20 8:52 ` crazylht at gmail dot com
@ 2022-10-20 10:35 ` jakub at gcc dot gnu.org
2022-10-21 16:35 ` cvs-commit at gcc dot gnu.org
2023-11-30 10:44 ` liuhongt at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-10-20 10:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107322
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 53733
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53733&action=edit
gcc13-pr107322.patch
Untested fix.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/107322] ICE: in extract_insn, at recog.cc:2791 (unrecognizable insn) with __bf16 compare
2022-10-19 18:39 [Bug target/107322] New: ICE: in extract_insn, at recog.cc:2791 (unrecognizable insn) with __bf16 compare zsojka at seznam dot cz
` (2 preceding siblings ...)
2022-10-20 10:35 ` jakub at gcc dot gnu.org
@ 2022-10-21 16:35 ` cvs-commit at gcc dot gnu.org
2023-11-30 10:44 ` liuhongt at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-10-21 16:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107322
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:5792208f5124f687376f25798668d105d7ddb270
commit r13-3439-g5792208f5124f687376f25798668d105d7ddb270
Author: Jakub Jelinek <jakub@redhat.com>
Date: Fri Oct 21 18:34:37 2022 +0200
i386: Fix up BFmode comparisons in conditional moves [PR107322]
As the testcase shows, when cbranchbf4/cstorebf4 patterns are defined,
we can get ICEs for conditional moves.
The problem is that the generic conditional move expansion just calls
prepare_cmp_insn which just checks that such a cbranch<mode>4 exists
and returns directly such comparison and passes it down to the conditional
move optabs.
The following patch fixes it by punting if the comparisons aren't
ix86_fp_comparison_operator (to tell the generic code it should separately
compare) and to handle the promotion of BFmode comparison operands to
SFmode such that comparison is performed in SFmode.
2022-10-21 Jakub Jelinek <jakub@redhat.com>
PR target/107322
* config/i386/i386-expand.cc (ix86_prepare_fp_compare_args): For
BFmode comparisons promote arguments to SFmode and recurse.
(ix86_expand_int_movcc, ix86_expand_fp_movcc): Return false early
if comparison operands are BFmode and operands[1] is not
ix86_fp_comparison_operator.
* gcc.target/i386/pr107322.c: New test.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/107322] ICE: in extract_insn, at recog.cc:2791 (unrecognizable insn) with __bf16 compare
2022-10-19 18:39 [Bug target/107322] New: ICE: in extract_insn, at recog.cc:2791 (unrecognizable insn) with __bf16 compare zsojka at seznam dot cz
` (3 preceding siblings ...)
2022-10-21 16:35 ` cvs-commit at gcc dot gnu.org
@ 2023-11-30 10:44 ` liuhongt at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: liuhongt at gcc dot gnu.org @ 2023-11-30 10:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107322
liuhongt at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |liuhongt at gcc dot gnu.org
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from liuhongt at gcc dot gnu.org ---
.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-11-30 10:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-19 18:39 [Bug target/107322] New: ICE: in extract_insn, at recog.cc:2791 (unrecognizable insn) with __bf16 compare zsojka at seznam dot cz
2022-10-20 8:44 ` [Bug target/107322] " marxin at gcc dot gnu.org
2022-10-20 8:52 ` crazylht at gmail dot com
2022-10-20 10:35 ` jakub at gcc dot gnu.org
2022-10-21 16:35 ` cvs-commit at gcc dot gnu.org
2023-11-30 10:44 ` liuhongt 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).