public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/98092] New: [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn)
@ 2020-12-02 5:32 asolokha at gmx dot com
2020-12-02 8:24 ` [Bug target/98092] " rguenth at gcc dot gnu.org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: asolokha at gmx dot com @ 2020-12-02 5:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98092
Bug ID: 98092
Summary: [11 Regression] ICE in extract_insn, at recog.c:2315
(error: unrecognizable insn)
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: asolokha at gmx dot com
Target Milestone: ---
Target: owerpc-*-linux-gnu
gcc-11.0.0-alpha20201129 snapshot (g:bb67ad5cff58a707aaae645d4f45a913d8511c86)
ICEs when compiling the following testcase, reduced from
gcc/testsuite/gcc.target/powerpc/bcd-4.c, w/ -mcpu=power9 -ffinite-math-only:
int
h9 (__attribute__ ((altivec (vector__))) char un)
{
return (__builtin_vec_bcdinvalid (un));
}
% powerpc-e300c3-linux-gnu-gcc-11.0.0 -mcpu=power9 -ffinite-math-only -c
n1uis1ie.c
n1uis1ie.c: In function 'h9':
n1uis1ie.c:5:1: error: unrecognizable insn:
5 | }
| ^
(insn 8 7 11 2 (set (reg:SI 118 [ _3 ])
(unordered:SI (reg:CCFP 106 6)
(const_int 0 [0]))) "n1uis1ie.c":4:10 -1
(nil))
during RTL pass: vregs
n1uis1ie.c:5:1: internal compiler error: in extract_insn, at recog.c:2315
0x68050a _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20201129/work/gcc-11-20201129/gcc/rtl-error.c:108
0x68052a _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20201129/work/gcc-11-20201129/gcc/rtl-error.c:116
0x67ebf3 extract_insn(rtx_insn*)
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20201129/work/gcc-11-20201129/gcc/recog.c:2315
0xacbbe1 instantiate_virtual_regs_in_insn
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20201129/work/gcc-11-20201129/gcc/function.c:1609
0xacbbe1 instantiate_virtual_regs
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20201129/work/gcc-11-20201129/gcc/function.c:1979
0xacbbe1 execute
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20201129/work/gcc-11-20201129/gcc/function.c:2028
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/98092] [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn)
2020-12-02 5:32 [Bug target/98092] New: [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn) asolokha at gmx dot com
@ 2020-12-02 8:24 ` rguenth at gcc dot gnu.org
2021-01-14 10:59 ` rguenth at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-12-02 8:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98092
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |11.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/98092] [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn)
2020-12-02 5:32 [Bug target/98092] New: [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn) asolokha at gmx dot com
2020-12-02 8:24 ` [Bug target/98092] " rguenth at gcc dot gnu.org
@ 2021-01-14 10:59 ` rguenth at gcc dot gnu.org
2021-01-22 12:46 ` jakub at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-01-14 10:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98092
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/98092] [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn)
2020-12-02 5:32 [Bug target/98092] New: [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn) asolokha at gmx dot com
2020-12-02 8:24 ` [Bug target/98092] " rguenth at gcc dot gnu.org
2021-01-14 10:59 ` rguenth at gcc dot gnu.org
@ 2021-01-22 12:46 ` jakub at gcc dot gnu.org
2021-01-22 20:57 ` cel at us dot ibm.com
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-01-22 12:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98092
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2021-01-22
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
CC| |carll at gcc dot gnu.org,
| |jakub at gcc dot gnu.org,
| |segher at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The expander emits an UNORDERED comparison:
(define_expand "bcdinvalid_<mode>"
[(parallel [(set (reg:CCFP CR6_REGNO)
(compare:CCFP
(unspec:V2DF [(match_operand:VBCD 1 "register_operand")]
UNSPEC_BCDADD)
(match_dup 2)))
(clobber (match_scratch:VBCD 3))])
(set (match_operand:SI 0 "register_operand")
(unordered:SI (reg:CCFP CR6_REGNO)
(const_int 0)))]
"TARGET_P8_VECTOR"
{
operands[2] = CONST0_RTX (V2DFmode);
})
But set<mode>_cc insn will not match with -ffinite-math-only for UNORDERED,
given:
(define_predicate "scc_comparison_operator"
(and (match_operand 0 "branch_comparison_operator")
(match_code "eq,lt,gt,ltu,gtu,unordered")))
(define_predicate "branch_comparison_operator"
(and (match_operand 0 "comparison_operator")
(match_test "GET_MODE_CLASS (GET_MODE (XEXP (op, 0))) == MODE_CC")
(if_then_else (match_test "GET_MODE (XEXP (op, 0)) == CCFPmode
&& !flag_finite_math_only")
(match_code "lt,gt,eq,unordered,unge,unle,ne,ordered")
(match_code "lt,ltu,le,leu,gt,gtu,ge,geu,eq,ne"))
(match_test "validate_condition_mode (GET_CODE (op),
GET_MODE (XEXP (op, 0))),
1")))
Dunno how to get out of this, perhaps for !flag_finite_math_only expand to a
different instruction that will do both the bcdadd. and mfcr and rlwinm and
just clobber the cc reg?
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/98092] [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn)
2020-12-02 5:32 [Bug target/98092] New: [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn) asolokha at gmx dot com
` (2 preceding siblings ...)
2021-01-22 12:46 ` jakub at gcc dot gnu.org
@ 2021-01-22 20:57 ` cel at us dot ibm.com
2021-01-23 1:14 ` segher at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cel at us dot ibm.com @ 2021-01-22 20:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98092
--- Comment #2 from Carl Love <cel at us dot ibm.com> ---
Segher:
Yup, I saw the buzilla. Will take a look at it.
Carl
On Fri, 2021-01-22 at 18:49 +0000, segher at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98092
>
> Segher Boessenkool <segher at gcc dot gnu.org> changed:
>
> What |Removed |Added
> -------------------------------------------------------------------
> ---------
> Assignee|unassigned at gcc dot gnu.org |segher at gcc
> dot gnu.org
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/98092] [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn)
2020-12-02 5:32 [Bug target/98092] New: [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn) asolokha at gmx dot com
` (3 preceding siblings ...)
2021-01-22 20:57 ` cel at us dot ibm.com
@ 2021-01-23 1:14 ` segher at gcc dot gnu.org
2021-03-05 14:02 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: segher at gcc dot gnu.org @ 2021-01-23 1:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98092
--- Comment #3 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Created attachment 50040
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50040&action=edit
Patch
Patch in testing.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/98092] [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn)
2020-12-02 5:32 [Bug target/98092] New: [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn) asolokha at gmx dot com
` (4 preceding siblings ...)
2021-01-23 1:14 ` segher at gcc dot gnu.org
@ 2021-03-05 14:02 ` jakub at gcc dot gnu.org
2021-03-16 18:17 ` [Bug target/98092] [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn) since r11-4623 jakub at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-03-05 14:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98092
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Any progress on this?
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/98092] [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn) since r11-4623
2020-12-02 5:32 [Bug target/98092] New: [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn) asolokha at gmx dot com
` (5 preceding siblings ...)
2021-03-05 14:02 ` jakub at gcc dot gnu.org
@ 2021-03-16 18:17 ` jakub at gcc dot gnu.org
2021-03-16 18:27 ` segher at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-03-16 18:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98092
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[11 Regression] ICE in |[11 Regression] ICE in
|extract_insn, at |extract_insn, at
|recog.c:2315 (error: |recog.c:2315 (error:
|unrecognizable insn) |unrecognizable insn) since
| |r11-4623
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The builtins were added in r11-4623-g05161256d3d2a598966ca1cf676fa0e427570f73 ,
before that it has been rejected with:
pr98092.c: In function ‘h9’:
pr98092.c:4:11: warning: implicit declaration of function
‘__builtin_vec_bcdinvalid’; did you mean ‘__builtin_vec_xxeval’?
[-Wimplicit-function-declaration]
4 | return (__builtin_vec_bcdinvalid (un));
| ^~~~~~~~~~~~~~~~~~~~~~~~
| __builtin_vec_xxeval
pr98092.c:4:3: error: AltiVec argument passed to unprototyped function
4 | return (__builtin_vec_bcdinvalid (un));
| ^~~~~~
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/98092] [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn) since r11-4623
2020-12-02 5:32 [Bug target/98092] New: [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn) asolokha at gmx dot com
` (6 preceding siblings ...)
2021-03-16 18:17 ` [Bug target/98092] [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn) since r11-4623 jakub at gcc dot gnu.org
@ 2021-03-16 18:27 ` segher at gcc dot gnu.org
2021-03-16 19:22 ` cvs-commit at gcc dot gnu.org
2021-03-16 19:25 ` jakub at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: segher at gcc dot gnu.org @ 2021-03-16 18:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98092
Segher Boessenkool <segher at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #50040|0 |1
is obsolete| |
--- Comment #6 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Created attachment 50401
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50401&action=edit
Patch
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/98092] [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn) since r11-4623
2020-12-02 5:32 [Bug target/98092] New: [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn) asolokha at gmx dot com
` (7 preceding siblings ...)
2021-03-16 18:27 ` segher at gcc dot gnu.org
@ 2021-03-16 19:22 ` cvs-commit at gcc dot gnu.org
2021-03-16 19:25 ` jakub at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-16 19:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98092
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Segher Boessenkool <segher@gcc.gnu.org>:
https://gcc.gnu.org/g:a0b5843a9b2b3e93bd119d5aef583f53ad2ef0bc
commit r11-7695-ga0b5843a9b2b3e93bd119d5aef583f53ad2ef0bc
Author: Segher Boessenkool <segher@kernel.crashing.org>
Date: Tue Mar 16 18:29:11 2021 +0000
rs6000: Workaround for PR98092
The bcdinvalid_<mode> RTL instruction uses the "unordered" comparison,
which cannot be used if we have -ffinite-math-only. We really need
CCMODEs that describe what bits in a CR field are set by other insns
than just comparisons, but that is a lot more surgery, and it is stage 4
now. This patch does a simple workaround.
2021-03-16 Segher Boessenkool <segher@kernel.crashing.org>
PR target/98092
* config/rs6000/predicates.md (branch_comparison_operator): Allow
ordered and unordered for CCFPmode, if flag_finite_math_only.
gcc/testsuite/
PR target/98092
* gcc.target/powerpc/pr98092.c: New.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/98092] [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn) since r11-4623
2020-12-02 5:32 [Bug target/98092] New: [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn) asolokha at gmx dot com
` (8 preceding siblings ...)
2021-03-16 19:22 ` cvs-commit at gcc dot gnu.org
@ 2021-03-16 19:25 ` jakub at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-03-16 19:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98092
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2021-03-16 19:25 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-02 5:32 [Bug target/98092] New: [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn) asolokha at gmx dot com
2020-12-02 8:24 ` [Bug target/98092] " rguenth at gcc dot gnu.org
2021-01-14 10:59 ` rguenth at gcc dot gnu.org
2021-01-22 12:46 ` jakub at gcc dot gnu.org
2021-01-22 20:57 ` cel at us dot ibm.com
2021-01-23 1:14 ` segher at gcc dot gnu.org
2021-03-05 14:02 ` jakub at gcc dot gnu.org
2021-03-16 18:17 ` [Bug target/98092] [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn) since r11-4623 jakub at gcc dot gnu.org
2021-03-16 18:27 ` segher at gcc dot gnu.org
2021-03-16 19:22 ` cvs-commit at gcc dot gnu.org
2021-03-16 19:25 ` 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).