* [Bug target/99025] [11 Regression] ICE Segmentation fault since r11-6351-g12ae2bc70846a2be
2021-02-09 14:38 [Bug target/99025] New: [11 Regression] ICE Segmentation fault since r11-6351-g12ae2bc70846a2be marxin at gcc dot gnu.org
@ 2021-02-09 14:39 ` marxin at gcc dot gnu.org
2021-02-09 18:51 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-02-09 14:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99025
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Priority|P3 |P1
Known to fail| |11.0
Status|UNCONFIRMED |NEW
Known to work| |10.2.0
Target Milestone|--- |11.0
Last reconfirmed| |2021-02-09
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/99025] [11 Regression] ICE Segmentation fault since r11-6351-g12ae2bc70846a2be
2021-02-09 14:38 [Bug target/99025] New: [11 Regression] ICE Segmentation fault since r11-6351-g12ae2bc70846a2be marxin at gcc dot gnu.org
2021-02-09 14:39 ` [Bug target/99025] " marxin at gcc dot gnu.org
@ 2021-02-09 18:51 ` jakub at gcc dot gnu.org
2021-02-10 9:00 ` ubizjak at gmail dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-02-09 18:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99025
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 #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 50154
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50154&action=edit
gcc11-pr99025.patch
Untested fix.
The problem is that when simplify_gen_subreg is called on a SUBREG and
simplify_subreg fails to simplify it, because of mismatching element mode as
well as mismatching size, then simplify_gen_subreg just returns NULL instead of
creating the subreg. The patch forces those SUBREGs into regs so that
simplify_gen_subreg will then always work.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/99025] [11 Regression] ICE Segmentation fault since r11-6351-g12ae2bc70846a2be
2021-02-09 14:38 [Bug target/99025] New: [11 Regression] ICE Segmentation fault since r11-6351-g12ae2bc70846a2be marxin at gcc dot gnu.org
2021-02-09 14:39 ` [Bug target/99025] " marxin at gcc dot gnu.org
2021-02-09 18:51 ` jakub at gcc dot gnu.org
@ 2021-02-10 9:00 ` ubizjak at gmail dot com
2021-02-10 9:56 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: ubizjak at gmail dot com @ 2021-02-10 9:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99025
--- Comment #2 from Uroš Bizjak <ubizjak at gmail dot com> ---
Comment on attachment 50154
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50154
gcc11-pr99025.patch
>2021-02-09 Jakub Jelinek <jakub@redhat.com>
>+ if (SUBREG_P (operands[1]))
>+ operands[1] = force_reg (V2SFmode, operands[1]);
There is no need to check for SUBREG, force_reg has early exit in case operand
is already a register.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/99025] [11 Regression] ICE Segmentation fault since r11-6351-g12ae2bc70846a2be
2021-02-09 14:38 [Bug target/99025] New: [11 Regression] ICE Segmentation fault since r11-6351-g12ae2bc70846a2be marxin at gcc dot gnu.org
` (2 preceding siblings ...)
2021-02-10 9:00 ` ubizjak at gmail dot com
@ 2021-02-10 9:56 ` jakub at gcc dot gnu.org
2021-02-10 18:50 ` cvs-commit at gcc dot gnu.org
2021-02-10 18:56 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-02-10 9:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99025
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Uroš Bizjak from comment #2)
> Comment on attachment 50154 [details]
> gcc11-pr99025.patch
>
> >2021-02-09 Jakub Jelinek <jakub@redhat.com>
>
> >+ if (SUBREG_P (operands[1]))
> >+ operands[1] = force_reg (V2SFmode, operands[1]);
>
> There is no need to check for SUBREG, force_reg has early exit in case
> operand is already a register.
I know, I've just misread nonimmediate_operand as nonmemory_operand and thought
I need to let immediates get through to simplify_gen_subreg.
The predicates are register_operand (so REG or SUBREG) or nonimmediate_operand
(so REG, SUBREG or MEM and in that case this is used in !MEM_P paths) and so
you're right force_reg can be called unconditionally.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/99025] [11 Regression] ICE Segmentation fault since r11-6351-g12ae2bc70846a2be
2021-02-09 14:38 [Bug target/99025] New: [11 Regression] ICE Segmentation fault since r11-6351-g12ae2bc70846a2be marxin at gcc dot gnu.org
` (3 preceding siblings ...)
2021-02-10 9:56 ` jakub at gcc dot gnu.org
@ 2021-02-10 18:50 ` cvs-commit at gcc dot gnu.org
2021-02-10 18:56 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-02-10 18:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99025
--- 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:20482cfcc1d3b71e0aec57b5b48685bf0b5402ca
commit r11-7177-g20482cfcc1d3b71e0aec57b5b48685bf0b5402ca
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Feb 10 19:50:11 2021 +0100
i386: Fix ICEs due to simplify_gen_subreg returning NULL [PR99025]
In these patterns, we call simplify_gen_subreg on the input operand
to create paradoxical subregs that have 2x, 4x or 8x elements as the input
operand. That works fine if the input operand is a REG, but when it is a
SUBREG, RTL doesn't allow SUBREG of SUBREG and so relies on simplify_subreg
actually simplifying it. And e.g. if the input operand is a SUBREG that
changes the element mode (floating vs. non-floating) and then combined with
a paradoxical subreg (i.e. different size) this can easily fail, then
simplify_gen_subreg returns NULL but we still use it in instructions.
Fixed by forcing the operands into REG.
2021-02-10 Jakub Jelinek <jakub@redhat.com>
PR target/99025
* config/i386/sse.md (fix<fixunssuffix>_truncv2sfv2di2,
<insn>v8qiv8hi2, <insn>v8qiv8si2, <insn>v4qiv4si2, <insn>v4hiv4si2,
<insn>v8qiv8di2, <insn>v4qiv4di2, <insn>v2qiv2di2, <insn>v4hiv4di2,
<insn>v2hiv2di2, <insn>v2siv2di2): Force operands[1] into REG
before
calling simplify_gen_subreg on it.
* gcc.target/i386/pr99025.c: New test.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/99025] [11 Regression] ICE Segmentation fault since r11-6351-g12ae2bc70846a2be
2021-02-09 14:38 [Bug target/99025] New: [11 Regression] ICE Segmentation fault since r11-6351-g12ae2bc70846a2be marxin at gcc dot gnu.org
` (4 preceding siblings ...)
2021-02-10 18:50 ` cvs-commit at gcc dot gnu.org
@ 2021-02-10 18:56 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-02-10 18:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99025
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 7+ messages in thread