public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/102031] New: [12 Regression] ICE in simplify_truncation, at simplify-rtx.c:620 since r12-3074-g7e5f9ead16d7514b3baa0254084de94f0bfcd216
@ 2021-08-24 7:20 marxin at gcc dot gnu.org
2021-08-24 7:23 ` [Bug target/102031] " pinskia at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-08-24 7:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102031
Bug ID: 102031
Summary: [12 Regression] ICE in simplify_truncation, at
simplify-rtx.c:620 since
r12-3074-g7e5f9ead16d7514b3baa0254084de94f0bfcd216
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: marxin at gcc dot gnu.org
CC: sayle at gcc dot gnu.org
Target Milestone: ---
Host: x86_64-linux-gnu
Target: s390x-linux-gnu
The following fails:
$ ./xgcc -B.
/home/marxin/Programming/gcc/gcc/testsuite/gcc.target/s390/vector/vcond-shift.c
-O2 -c
during RTL pass: combine
/home/marxin/Programming/gcc/gcc/testsuite/gcc.target/s390/vector/vcond-shift.c:
In function ‘vesrlh_lt’:
/home/marxin/Programming/gcc/gcc/testsuite/gcc.target/s390/vector/vcond-shift.c:134:1:
internal compiler error: in simplify_truncation, at simplify-rtx.c:620
134 | }
| ^
0x12a44cc simplify_context::simplify_truncation(machine_mode, rtx_def*,
machine_mode)
/home/marxin/Programming/gcc2/gcc/simplify-rtx.c:620
0x12a6c58 simplify_context::simplify_unary_operation_1(rtx_code, machine_mode,
rtx_def*)
/home/marxin/Programming/gcc2/gcc/simplify-rtx.c:1230
0x12a5858 simplify_context::simplify_unary_operation(rtx_code, machine_mode,
rtx_def*, machine_mode)
/home/marxin/Programming/gcc2/gcc/simplify-rtx.c:893
0x12a3ac7 simplify_context::simplify_gen_unary(rtx_code, machine_mode,
rtx_def*, machine_mode)
/home/marxin/Programming/gcc2/gcc/simplify-rtx.c:360
0x12a56e2 simplify_context::simplify_truncation(machine_mode, rtx_def*,
machine_mode)
/home/marxin/Programming/gcc2/gcc/simplify-rtx.c:856
0x12a6c58 simplify_context::simplify_unary_operation_1(rtx_code, machine_mode,
rtx_def*)
/home/marxin/Programming/gcc2/gcc/simplify-rtx.c:1230
0x12a5858 simplify_context::simplify_unary_operation(rtx_code, machine_mode,
rtx_def*, machine_mode)
/home/marxin/Programming/gcc2/gcc/simplify-rtx.c:893
0x12a3ac7 simplify_context::simplify_gen_unary(rtx_code, machine_mode,
rtx_def*, machine_mode)
/home/marxin/Programming/gcc2/gcc/simplify-rtx.c:360
0x12a4a2f simplify_context::simplify_truncation(machine_mode, rtx_def*,
machine_mode)
/home/marxin/Programming/gcc2/gcc/simplify-rtx.c:722
0x12c175f simplify_context::simplify_subreg(machine_mode, rtx_def*,
machine_mode, poly_int<1u, unsigned long>)
/home/marxin/Programming/gcc2/gcc/simplify-rtx.c:7373
0xda796d simplify_subreg(machine_mode, rtx_def*, machine_mode, poly_int<1u,
unsigned long>)
/home/marxin/Programming/gcc2/gcc/rtl.h:3489
0x1ed8391 combine_simplify_rtx
/home/marxin/Programming/gcc2/gcc/combine.c:5804
0x1ed76de subst
/home/marxin/Programming/gcc2/gcc/combine.c:5535
0x1ed7455 subst
/home/marxin/Programming/gcc2/gcc/combine.c:5468
0x1ed020c try_combine
/home/marxin/Programming/gcc2/gcc/combine.c:3262
0x1eca7eb combine_instructions
/home/marxin/Programming/gcc2/gcc/combine.c:1267
0x1ef3802 rest_of_handle_combine
/home/marxin/Programming/gcc2/gcc/combine.c:14873
0x1ef38c2 execute
/home/marxin/Programming/gcc2/gcc/combine.c:14918
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/102031] [12 Regression] ICE in simplify_truncation, at simplify-rtx.c:620 since r12-3074-g7e5f9ead16d7514b3baa0254084de94f0bfcd216
2021-08-24 7:20 [Bug target/102031] New: [12 Regression] ICE in simplify_truncation, at simplify-rtx.c:620 since r12-3074-g7e5f9ead16d7514b3baa0254084de94f0bfcd216 marxin at gcc dot gnu.org
@ 2021-08-24 7:23 ` pinskia at gcc dot gnu.org
2021-08-24 9:17 ` [Bug rtl-optimization/102031] " roger at nextmovesoftware dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-24 7:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102031
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/102031] [12 Regression] ICE in simplify_truncation, at simplify-rtx.c:620 since r12-3074-g7e5f9ead16d7514b3baa0254084de94f0bfcd216
2021-08-24 7:20 [Bug target/102031] New: [12 Regression] ICE in simplify_truncation, at simplify-rtx.c:620 since r12-3074-g7e5f9ead16d7514b3baa0254084de94f0bfcd216 marxin at gcc dot gnu.org
2021-08-24 7:23 ` [Bug target/102031] " pinskia at gcc dot gnu.org
@ 2021-08-24 9:17 ` roger at nextmovesoftware dot com
2021-08-24 9:24 ` marxin at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: roger at nextmovesoftware dot com @ 2021-08-24 9:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102031
Roger Sayle <roger at nextmovesoftware dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |roger at nextmovesoftware dot com
Last reconfirmed| |2021-08-24
Ever confirmed|0 |1
CC| |roger at nextmovesoftware dot com
Status|UNCONFIRMED |ASSIGNED
--- Comment #1 from Roger Sayle <roger at nextmovesoftware dot com> ---
It's just not my week... A pair of silly typos. Here's the fix I'm testing:
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index 8eea9fb..c81e27e 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -841,7 +841,7 @@ simplify_context::simplify_truncation (machine_mode mode,
rt
x op,
{
unsigned int int_op_prec = GET_MODE_PRECISION (int_op_mode);
unsigned int subreg_prec = GET_MODE_PRECISION (subreg_mode);
- if (int_op_prec > subreg_mode)
+ if (int_op_prec > subreg_prec)
{
if (int_mode == subreg_mode)
return SUBREG_REG (op);
@@ -851,7 +851,7 @@ simplify_context::simplify_truncation (machine_mode mode,
rt
x op,
}
/* Simplification of (truncate:A (subreg:B X:C 0)) where
A is narrower than B and B is narrower than C. */
- else if (int_op_prec < subreg_mode
+ else if (int_op_prec < subreg_prec
&& GET_MODE_PRECISION (int_mode) < int_op_prec)
return simplify_gen_unary (TRUNCATE, int_mode,
SUBREG_REG (op), subreg_mode);
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/102031] [12 Regression] ICE in simplify_truncation, at simplify-rtx.c:620 since r12-3074-g7e5f9ead16d7514b3baa0254084de94f0bfcd216
2021-08-24 7:20 [Bug target/102031] New: [12 Regression] ICE in simplify_truncation, at simplify-rtx.c:620 since r12-3074-g7e5f9ead16d7514b3baa0254084de94f0bfcd216 marxin at gcc dot gnu.org
2021-08-24 7:23 ` [Bug target/102031] " pinskia at gcc dot gnu.org
2021-08-24 9:17 ` [Bug rtl-optimization/102031] " roger at nextmovesoftware dot com
@ 2021-08-24 9:24 ` marxin at gcc dot gnu.org
2021-08-24 21:08 ` cvs-commit at gcc dot gnu.org
2021-08-30 7:57 ` marxin at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-08-24 9:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102031
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
> It's just not my week... A pair of silly typos.
Don't worry, it's so easy to make a typo :P
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/102031] [12 Regression] ICE in simplify_truncation, at simplify-rtx.c:620 since r12-3074-g7e5f9ead16d7514b3baa0254084de94f0bfcd216
2021-08-24 7:20 [Bug target/102031] New: [12 Regression] ICE in simplify_truncation, at simplify-rtx.c:620 since r12-3074-g7e5f9ead16d7514b3baa0254084de94f0bfcd216 marxin at gcc dot gnu.org
` (2 preceding siblings ...)
2021-08-24 9:24 ` marxin at gcc dot gnu.org
@ 2021-08-24 21:08 ` cvs-commit at gcc dot gnu.org
2021-08-30 7:57 ` marxin at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-08-24 21:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102031
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Roger Sayle <sayle@gcc.gnu.org>:
https://gcc.gnu.org/g:81e1894456bc6214c0c42148ff2b1bed142a3545
commit r12-3130-g81e1894456bc6214c0c42148ff2b1bed142a3545
Author: Roger Sayle <roger@nextmovesoftware.com>
Date: Tue Aug 24 22:07:41 2021 +0100
[Committed] PR middle-end/102031: Fix typo/mistake in simplify_truncation
patch.
My apologies again. My patch to simplify truncations of SUBREGs in
simplify-rtx.c contained an error where I'd accidentally compared
against a mode instead of the precision of that mode. Grr! It even
survived regression testing on two platforms. Fixed below, and
committed as obvious, after a full "make bootstrap" and "make -k check"
on x86_64-pc-linux-gnu with no new regressions.
2021-08-24 Roger Sayle <roger@nextmovesoftware.com>
gcc/ChangeLog
PR middle-end/102031
* simplify-rtx.c (simplify_truncation): When comparing precisions
use "subreg_prec" variable, not "subreg_mode".
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/102031] [12 Regression] ICE in simplify_truncation, at simplify-rtx.c:620 since r12-3074-g7e5f9ead16d7514b3baa0254084de94f0bfcd216
2021-08-24 7:20 [Bug target/102031] New: [12 Regression] ICE in simplify_truncation, at simplify-rtx.c:620 since r12-3074-g7e5f9ead16d7514b3baa0254084de94f0bfcd216 marxin at gcc dot gnu.org
` (3 preceding siblings ...)
2021-08-24 21:08 ` cvs-commit at gcc dot gnu.org
@ 2021-08-30 7:57 ` marxin at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-08-30 7:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102031
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
Fixed now.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-08-30 7:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-24 7:20 [Bug target/102031] New: [12 Regression] ICE in simplify_truncation, at simplify-rtx.c:620 since r12-3074-g7e5f9ead16d7514b3baa0254084de94f0bfcd216 marxin at gcc dot gnu.org
2021-08-24 7:23 ` [Bug target/102031] " pinskia at gcc dot gnu.org
2021-08-24 9:17 ` [Bug rtl-optimization/102031] " roger at nextmovesoftware dot com
2021-08-24 9:24 ` marxin at gcc dot gnu.org
2021-08-24 21:08 ` cvs-commit at gcc dot gnu.org
2021-08-30 7:57 ` 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).