public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/103485] New: [12 Regression] ICE: in emit_move_insn, at expr.c:4013 with -O -fno-tree-dce -fno-tree-dse
@ 2021-11-30 6:36 zsojka at seznam dot cz
2021-11-30 7:17 ` [Bug rtl-optimization/103485] " rguenth at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: zsojka at seznam dot cz @ 2021-11-30 6:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103485
Bug ID: 103485
Summary: [12 Regression] ICE: in emit_move_insn, at expr.c:4013
with -O -fno-tree-dce -fno-tree-dse
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: zsojka at seznam dot cz
Target Milestone: ---
Host: x86_64-pc-linux-gnu
Created attachment 51905
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51905&action=edit
reduced testcase
Compiler output:
$ x86_64-pc-linux-gnu-gcc -O -fno-tree-dce -fno-tree-dse testcase.c
during RTL pass: expand
testcase.c: In function 'foo':
testcase.c:5:1: internal compiler error: in emit_move_insn, at expr.c:4013
5 | foo (void)
| ^~~
0x6bfb55 emit_move_insn(rtx_def*, rtx_def*)
/repo/gcc-trunk/gcc/expr.c:4013
0xe517aa expand_gimple_stmt_1
/repo/gcc-trunk/gcc/cfgexpand.c:3994
0xe517aa expand_gimple_stmt
/repo/gcc-trunk/gcc/cfgexpand.c:4028
0xe57508 expand_gimple_basic_block
/repo/gcc-trunk/gcc/cfgexpand.c:6069
0xe59697 execute
/repo/gcc-trunk/gcc/cfgexpand.c:6795
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.
$ 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-r12-5590-20211129212232-g6c7d489a1e6-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/12.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-r12-5590-20211129212232-g6c7d489a1e6-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.0 20211130 (experimental) (GCC)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug rtl-optimization/103485] [12 Regression] ICE: in emit_move_insn, at expr.c:4013 with -O -fno-tree-dce -fno-tree-dse
2021-11-30 6:36 [Bug rtl-optimization/103485] New: [12 Regression] ICE: in emit_move_insn, at expr.c:4013 with -O -fno-tree-dce -fno-tree-dse zsojka at seznam dot cz
@ 2021-11-30 7:17 ` rguenth at gcc dot gnu.org
2021-11-30 8:17 ` cvs-commit at gcc dot gnu.org
2021-11-30 8:17 ` rguenth at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-30 7:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103485
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2021-11-30
Status|UNCONFIRMED |ASSIGNED
Priority|P3 |P1
Ever confirmed|0 |1
Target| |x86_64-*-*
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Target Milestone|--- |12.0
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.
(gdb) p debug_gimple_stmt (stmt)
_12 = (vector(8) signed int) foo_v256u8_0.0_1;
$1 = void
(gdb) p debug_tree (gimple_assign_lhs (stmt))
<ssa_name 0x7ffff66ab3a8
type <vector_type 0x7ffff66a5348
type <integer_type 0x7ffff66a52a0 SI
size <integer_cst 0x7ffff6543f90 constant 32>
unit-size <integer_cst 0x7ffff6543fa8 constant 4>
align:32 warn_if_not_align:0 symtab:0 alias-set 2 canonical-type
0x7ffff66a52a0 precision:32 min <integer_cst 0x7ffff6562438 -2147483648> max
<integer_cst 0x7ffff66b0570 2147483647>>
BLK
size <integer_cst 0x7ffff65620c0 constant 256>
unit-size <integer_cst 0x7ffff65621b0 constant 32>
align:256 warn_if_not_align:0 symtab:0 alias-set 2 canonical-type
0x7ffff66a5348 nunits:8>
visited
def_stmt _12 = (vector(8) signed int) foo_v256u8_0.0_1;
version:12>
$2 = void
(gdb) p debug_tree (gimple_assign_rhs1 (stmt))
<ssa_name 0x7ffff654ed80
type <vector_type 0x7ffff667abd0
type <integer_type 0x7ffff655e690 unsigned int public unsigned SI
size <integer_cst 0x7ffff6543f90 constant 32>
unit-size <integer_cst 0x7ffff6543fa8 constant 4>
align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7ffff655e690 precision:32 min <integer_cst 0x7ffff6543fc0 0> max <integer_cst
0x7ffff6543f78 4294967295>
pointer_to_this <pointer_type 0x7ffff656e1f8>>
unsigned BLK
size <integer_cst 0x7ffff65620c0 constant 256>
unit-size <integer_cst 0x7ffff65621b0 constant 32>
align:256 warn_if_not_align:0 symtab:0 alias-set 1 canonical-type
0x7ffff667abd0 nunits:8
pointer_to_this <pointer_type 0x7ffff66a51f8>>
visited
def_stmt foo_v256u8_0.0_1 = foo_v256u8_0;
version:1>
$3 = void
the issue is that we introduce a non-V_C_E vector conversion in
forwprop3 that is not supported by the target and vector lowering is
not supporting lowering of such conversions.
/* Fold -((int)x >> (prec - 1)) into (unsigned)x >> (prec - 1). */
(simplify
(negate (convert? (rshift @0 INTEGER_CST@1)))
(if (tree_nop_conversion_p (type, TREE_TYPE (@0))
&& wi::to_wide (@1) == element_precision (type) - 1)
(with { tree stype = TREE_TYPE (@0);
tree ntype = TYPE_UNSIGNED (stype) ? signed_type_for (stype)
: unsigned_type_for (stype); }
(convert (rshift:ntype (convert:ntype @0) @1)))))
is the pattern responsible. For vector types this needs to check availability
of (convert ...) support or alternatively use VIEW_CONVERT.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug rtl-optimization/103485] [12 Regression] ICE: in emit_move_insn, at expr.c:4013 with -O -fno-tree-dce -fno-tree-dse
2021-11-30 6:36 [Bug rtl-optimization/103485] New: [12 Regression] ICE: in emit_move_insn, at expr.c:4013 with -O -fno-tree-dce -fno-tree-dse zsojka at seznam dot cz
2021-11-30 7:17 ` [Bug rtl-optimization/103485] " rguenth at gcc dot gnu.org
@ 2021-11-30 8:17 ` cvs-commit at gcc dot gnu.org
2021-11-30 8:17 ` rguenth at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-11-30 8:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103485
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:e2521cd2d26661cfcfceaabf9bd281ef316fd3fc
commit r12-5593-ge2521cd2d26661cfcfceaabf9bd281ef316fd3fc
Author: Richard Biener <rguenther@suse.de>
Date: Tue Nov 30 08:19:24 2021 +0100
middle-end/103485 - fix conversion kind for vectors
This makes sure to use a VIEW_CONVERT_EXPR for converting
vector signedness in the -((int)x >> (prec - 1)) to (unsigned)x >> (prec -
1)
simplification.
2021-11-30 Richard Biener <rguenther@suse.de>
PR middle-end/103485
* match.pd (-((int)x >> (prec - 1)) to (unsigned)x >> (prec - 1)):
Use VIEW_CONVERT_EXPR for vectors.
* gcc.dg/pr103485.c: New testcase.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug rtl-optimization/103485] [12 Regression] ICE: in emit_move_insn, at expr.c:4013 with -O -fno-tree-dce -fno-tree-dse
2021-11-30 6:36 [Bug rtl-optimization/103485] New: [12 Regression] ICE: in emit_move_insn, at expr.c:4013 with -O -fno-tree-dce -fno-tree-dse zsojka at seznam dot cz
2021-11-30 7:17 ` [Bug rtl-optimization/103485] " rguenth at gcc dot gnu.org
2021-11-30 8:17 ` cvs-commit at gcc dot gnu.org
@ 2021-11-30 8:17 ` rguenth at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-30 8:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103485
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-11-30 8:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-30 6:36 [Bug rtl-optimization/103485] New: [12 Regression] ICE: in emit_move_insn, at expr.c:4013 with -O -fno-tree-dce -fno-tree-dse zsojka at seznam dot cz
2021-11-30 7:17 ` [Bug rtl-optimization/103485] " rguenth at gcc dot gnu.org
2021-11-30 8:17 ` cvs-commit at gcc dot gnu.org
2021-11-30 8:17 ` rguenth 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).