public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/98037] New: ICE in dse.c:find_shift_sequence for large non-integer modes
@ 2020-11-27 16:41 rsandifo at gcc dot gnu.org
2020-11-27 16:41 ` [Bug rtl-optimization/98037] " rsandifo at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2020-11-27 16:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98037
Bug ID: 98037
Summary: ICE in dse.c:find_shift_sequence for large non-integer
modes
Product: gcc
Version: 10.2.1
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: rsandifo at gcc dot gnu.org
Target Milestone: ---
Target: aarch64*-*-*
Compiling the following test on AArch64 with -march=armv8.2-a+sve
-msve-vector-bits=512:
-----------------------------------------------------------------
typedef __SVInt8_t vec __attribute__((arm_sve_vector_bits(512)));
struct pair { vec v[2]; };
void use(pair &);
vec f(pair p) { vec v = p.v[1]; use(p); return v; }
-----------------------------------------------------------------
triggers:
foo.c:4:51: internal compiler error: in smallest_mode_for_size, at
stor-layout.c:356
4 | vec f(pair p) { vec v = p.v[1]; use(p); return v; }
| ^
... smallest_mode_for_size(poly_int<2u, unsigned long>, mode_class)
.../gcc/stor-layout.c:356
... smallest_int_mode_for_size(poly_int<2u, unsigned long>)
.../gcc/machmode.h:879
... find_shift_sequence
.../gcc/dse.c:1731
because there is no integer mode big enough to represent the
access size.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/98037] ICE in dse.c:find_shift_sequence for large non-integer modes
2020-11-27 16:41 [Bug rtl-optimization/98037] New: ICE in dse.c:find_shift_sequence for large non-integer modes rsandifo at gcc dot gnu.org
@ 2020-11-27 16:41 ` rsandifo at gcc dot gnu.org
2020-11-30 17:16 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2020-11-27 16:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98037
rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2020-11-27
Status|UNCONFIRMED |ASSIGNED
Target Milestone|--- |10.3
Assignee|unassigned at gcc dot gnu.org |rsandifo at gcc dot gnu.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/98037] ICE in dse.c:find_shift_sequence for large non-integer modes
2020-11-27 16:41 [Bug rtl-optimization/98037] New: ICE in dse.c:find_shift_sequence for large non-integer modes rsandifo at gcc dot gnu.org
2020-11-27 16:41 ` [Bug rtl-optimization/98037] " rsandifo at gcc dot gnu.org
@ 2020-11-30 17:16 ` cvs-commit at gcc dot gnu.org
2020-12-02 16:21 ` cvs-commit at gcc dot gnu.org
2020-12-02 18:41 ` rsandifo at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-11-30 17:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98037
--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Sandiford <rsandifo@gcc.gnu.org>:
https://gcc.gnu.org/g:f835e9f6562dda9c8a1384be2c9d4e45c112ed8e
commit r11-5580-gf835e9f6562dda9c8a1384be2c9d4e45c112ed8e
Author: Richard Sandiford <richard.sandiford@arm.com>
Date: Mon Nov 30 17:15:47 2020 +0000
dse: Cope with bigger-than-integer modes [PR98037]
dse.c:find_shift_sequence tries to represent a store and load
back as a shift right followed by a truncation. It therefore
needs to find an integer mode in which to do the shift right.
The loop it uses has the form:
FOR_EACH_MODE_FROM (new_mode_iter,
smallest_int_mode_for_size (GET_MODE_BITSIZE
(read_mode)))
which implicitly assumes that read_mode has an equivalent integer mode.
As shown in the testcase, not all modes have such an integer mode.
This patch just makes the code start from the smallest integer mode and
skip modes that are too small. The loop already breaks at the first
mode wider than word_mode.
gcc/
PR rtl-optimization/98037
* dse.c (find_shift_sequence): Iterate over all integers and
skip modes that are too small.
gcc/testsuite/
PR rtl-optimization/98037
* gcc.target/aarch64/sve/acle/general/pr98037.c: New test.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/98037] ICE in dse.c:find_shift_sequence for large non-integer modes
2020-11-27 16:41 [Bug rtl-optimization/98037] New: ICE in dse.c:find_shift_sequence for large non-integer modes rsandifo at gcc dot gnu.org
2020-11-27 16:41 ` [Bug rtl-optimization/98037] " rsandifo at gcc dot gnu.org
2020-11-30 17:16 ` cvs-commit at gcc dot gnu.org
@ 2020-12-02 16:21 ` cvs-commit at gcc dot gnu.org
2020-12-02 18:41 ` rsandifo at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-12-02 16:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98037
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Richard Sandiford
<rsandifo@gcc.gnu.org>:
https://gcc.gnu.org/g:fb9ee3e7419178e6530c09b99272022d062b50f3
commit r10-9108-gfb9ee3e7419178e6530c09b99272022d062b50f3
Author: Richard Sandiford <richard.sandiford@arm.com>
Date: Wed Dec 2 16:20:34 2020 +0000
dse: Cope with bigger-than-integer modes [PR98037]
dse.c:find_shift_sequence tries to represent a store and load
back as a shift right followed by a truncation. It therefore
needs to find an integer mode in which to do the shift right.
The loop it uses has the form:
FOR_EACH_MODE_FROM (new_mode_iter,
smallest_int_mode_for_size (GET_MODE_BITSIZE
(read_mode)))
which implicitly assumes that read_mode has an equivalent integer mode.
As shown in the testcase, not all modes have such an integer mode.
This patch just makes the code start from the smallest integer mode and
skip modes that are too small. The loop already breaks at the first
mode wider than word_mode.
gcc/
PR rtl-optimization/98037
* dse.c (find_shift_sequence): Iterate over all integers and
skip modes that are too small.
gcc/testsuite/
PR rtl-optimization/98037
* gcc.target/aarch64/sve/acle/general/pr98037.c: New test.
(cherry picked from commit f835e9f6562dda9c8a1384be2c9d4e45c112ed8e)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/98037] ICE in dse.c:find_shift_sequence for large non-integer modes
2020-11-27 16:41 [Bug rtl-optimization/98037] New: ICE in dse.c:find_shift_sequence for large non-integer modes rsandifo at gcc dot gnu.org
` (2 preceding siblings ...)
2020-12-02 16:21 ` cvs-commit at gcc dot gnu.org
@ 2020-12-02 18:41 ` rsandifo at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2020-12-02 18:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98037
rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #3 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Fixed on trunk and GCC 10 branch.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-12-02 18:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-27 16:41 [Bug rtl-optimization/98037] New: ICE in dse.c:find_shift_sequence for large non-integer modes rsandifo at gcc dot gnu.org
2020-11-27 16:41 ` [Bug rtl-optimization/98037] " rsandifo at gcc dot gnu.org
2020-11-30 17:16 ` cvs-commit at gcc dot gnu.org
2020-12-02 16:21 ` cvs-commit at gcc dot gnu.org
2020-12-02 18:41 ` rsandifo 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).