public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/104496] New: [12 Regression] ICE: in as_a, at machmode.h:365 with -O -mgeneral-regs-only -msse
@ 2022-02-11 5:45 zsojka at seznam dot cz
2022-02-11 6:52 ` [Bug target/104496] " crazylht at gmail dot com
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: zsojka at seznam dot cz @ 2022-02-11 5:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104496
Bug ID: 104496
Summary: [12 Regression] ICE: in as_a, at machmode.h:365 with
-O -mgeneral-regs-only -msse
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: zsojka at seznam dot cz
Target Milestone: ---
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Created attachment 52411
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52411&action=edit
reduced testcase
Compiler output:
$ x86_64-pc-linux-gnu-gcc -O -mgeneral-regs-only -msse testcase.c
during GIMPLE pass: ccp
testcase.c: In function 'foo':
testcase.c:9:1: internal compiler error: in as_a, at machmode.h:365
9 | }
| ^
0x785e9a scalar_int_mode as_a<scalar_int_mode>(machine_mode)
/repo/gcc-trunk/gcc/machmode.h:365
0x788612 scalar_mode as_a<scalar_mode>(machine_mode)
/repo/gcc-trunk/gcc/tree.h:3568
0x788612 layout_type(tree_node*)
/repo/gcc-trunk/gcc/stor-layout.cc:2402
0x16763a9 make_vector_type
/repo/gcc-trunk/gcc/tree.cc:8945
0x16764dd make_vector_type
/repo/gcc-trunk/gcc/tree.cc:8943
0x10cb3a0 vectorized_internal_fn_supported_p(internal_fn, tree_node*)
/repo/gcc-trunk/gcc/internal-fn.cc:4401
0x186815f gimple_simplify_VEC_COND_EXPR
/repo/build-gcc-trunk-amd64/gcc/gimple-match.cc:195745
0x187abb2 gimple_resimplify3
/repo/gcc-trunk/gcc/gimple-match-head.cc:397
0x19184e5 gimple_simplify_BIT_IOR_EXPR
/repo/build-gcc-trunk-amd64/gcc/gimple-match.cc:115459
0x185cd22 gimple_resimplify2
/repo/gcc-trunk/gcc/gimple-match-head.cc:321
0x18bbe10 gimple_simplify(gimple*, gimple_match_op*, gimple**, tree_node*
(*)(tree_node*), tree_node* (*)(tree_node*))
/repo/gcc-trunk/gcc/gimple-match-head.cc:1113
0x1044339 gimple_fold_stmt_to_constant_1(gimple*, tree_node* (*)(tree_node*),
tree_node* (*)(tree_node*))
/repo/gcc-trunk/gcc/gimple-fold.cc:7328
0x14b5b6f ccp_fold
/repo/gcc-trunk/gcc/tree-ssa-ccp.cc:1289
0x14b5b6f evaluate_stmt
/repo/gcc-trunk/gcc/tree-ssa-ccp.cc:2208
0x14b7ebd visit_assignment
/repo/gcc-trunk/gcc/tree-ssa-ccp.cc:2841
0x1556fb3 ssa_propagation_engine::simulate_stmt(gimple*)
/repo/gcc-trunk/gcc/tree-ssa-propagate.cc:230
0x155728a ssa_propagation_engine::simulate_block(basic_block_def*)
/repo/gcc-trunk/gcc/tree-ssa-propagate.cc:337
0x15576a3 ssa_propagation_engine::ssa_propagate()
/repo/gcc-trunk/gcc/tree-ssa-propagate.cc:504
0x14aa200 do_ssa_ccp
/repo/gcc-trunk/gcc/tree-ssa-ccp.cc:2960
0x14aa200 execute
/repo/gcc-trunk/gcc/tree-ssa-ccp.cc:3004
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
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-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r12-7186-20220210101436-gb25a7c05f12-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/12.0.1/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-7186-20220210101436-gb25a7c05f12-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.1 20220210 (experimental) (GCC)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/104496] [12 Regression] ICE: in as_a, at machmode.h:365 with -O -mgeneral-regs-only -msse
2022-02-11 5:45 [Bug target/104496] New: [12 Regression] ICE: in as_a, at machmode.h:365 with -O -mgeneral-regs-only -msse zsojka at seznam dot cz
@ 2022-02-11 6:52 ` crazylht at gmail dot com
2022-02-11 7:40 ` crazylht at gmail dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: crazylht at gmail dot com @ 2022-02-11 6:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104496
--- Comment #1 from Hongtao.liu <crazylht at gmail dot com> ---
w/ -mno-sse2 -mno-mmx, reproduce ICE.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/104496] [12 Regression] ICE: in as_a, at machmode.h:365 with -O -mgeneral-regs-only -msse
2022-02-11 5:45 [Bug target/104496] New: [12 Regression] ICE: in as_a, at machmode.h:365 with -O -mgeneral-regs-only -msse zsojka at seznam dot cz
2022-02-11 6:52 ` [Bug target/104496] " crazylht at gmail dot com
@ 2022-02-11 7:40 ` crazylht at gmail dot com
2022-02-11 7:44 ` crazylht at gmail dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: crazylht at gmail dot com @ 2022-02-11 7:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104496
--- Comment #2 from Hongtao.liu <crazylht at gmail dot com> ---
here is type V, a vector type with DImode and hit ICE in build
build_vector_type_for_mode (type, mode) which take type as inner_type.
<vector_type 0x7fffea3ec498
type <integer_type 0x7fffea2fe5e8 int public SI
size <integer_cst 0x7fffea2e2f90 constant 32>
unit-size <integer_cst 0x7fffea2e2fa8 constant 4>
align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7fffea2fe5e8 precision:32 min <integer_cst 0x7fffea2e2f48 -2147483648> max
<integer_cst 0x7fffea2e2f60 2147483647>
pointer_to_this <pointer_type 0x7fffea3069d8>>
DI
size <integer_cst 0x7fffea2e2d50 type <integer_type 0x7fffea2fe0a8
bitsizetype> constant 64>
unit-size <integer_cst 0x7fffea2e2d68 type <integer_type 0x7fffea2fe000
sizetype> constant 8>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/104496] [12 Regression] ICE: in as_a, at machmode.h:365 with -O -mgeneral-regs-only -msse
2022-02-11 5:45 [Bug target/104496] New: [12 Regression] ICE: in as_a, at machmode.h:365 with -O -mgeneral-regs-only -msse zsojka at seznam dot cz
2022-02-11 6:52 ` [Bug target/104496] " crazylht at gmail dot com
2022-02-11 7:40 ` crazylht at gmail dot com
@ 2022-02-11 7:44 ` crazylht at gmail dot com
2022-02-11 9:24 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: crazylht at gmail dot com @ 2022-02-11 7:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104496
--- Comment #3 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to Hongtao.liu from comment #2)
> here is type V, a vector type with DImode and hit ICE in build
> build_vector_type_for_mode (type, mode) which take type as inner_type.
>
> <vector_type 0x7fffea3ec498
> type <integer_type 0x7fffea2fe5e8 int public SI
> size <integer_cst 0x7fffea2e2f90 constant 32>
> unit-size <integer_cst 0x7fffea2e2fa8 constant 4>
> align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
> 0x7fffea2fe5e8 precision:32 min <integer_cst 0x7fffea2e2f48 -2147483648> max
> <integer_cst 0x7fffea2e2f60 2147483647>
> pointer_to_this <pointer_type 0x7fffea3069d8>>
> DI
> size <integer_cst 0x7fffea2e2d50 type <integer_type 0x7fffea2fe0a8
> bitsizetype> constant 64>
> unit-size <integer_cst 0x7fffea2e2d68 type <integer_type 0x7fffea2fe000
> sizetype> constant 8>
/* If TYPE is a vector type, return true if IFN is a direct internal
function that is supported for that type. If TYPE is a scalar type,
return true if IFN is a direct internal function that is supported for
the target's preferred vector version of TYPE. */
Hmm, TYPE is vector type, but mode is scalar mode.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/104496] [12 Regression] ICE: in as_a, at machmode.h:365 with -O -mgeneral-regs-only -msse
2022-02-11 5:45 [Bug target/104496] New: [12 Regression] ICE: in as_a, at machmode.h:365 with -O -mgeneral-regs-only -msse zsojka at seznam dot cz
` (2 preceding siblings ...)
2022-02-11 7:44 ` crazylht at gmail dot com
@ 2022-02-11 9:24 ` rguenth at gcc dot gnu.org
2022-02-11 10:28 ` cvs-commit at gcc dot gnu.org
2022-02-11 10:55 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-02-11 9:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104496
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.0
Status|UNCONFIRMED |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Last reconfirmed| |2022-02-11
Ever confirmed|0 |1
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
So the issue is that for GPR mode vectors vectorized_internal_fn_supported_p
isn't careful enough. Let me fix that.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/104496] [12 Regression] ICE: in as_a, at machmode.h:365 with -O -mgeneral-regs-only -msse
2022-02-11 5:45 [Bug target/104496] New: [12 Regression] ICE: in as_a, at machmode.h:365 with -O -mgeneral-regs-only -msse zsojka at seznam dot cz
` (3 preceding siblings ...)
2022-02-11 9:24 ` rguenth at gcc dot gnu.org
@ 2022-02-11 10:28 ` cvs-commit at gcc dot gnu.org
2022-02-11 10:55 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-11 10:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104496
--- Comment #5 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:72f8d228aff80ede554b1735533af7eb0bd4a912
commit r12-7195-g72f8d228aff80ede554b1735533af7eb0bd4a912
Author: Richard Biener <rguenther@suse.de>
Date: Fri Feb 11 10:27:20 2022 +0100
middle-end/104496 - fix vectorized_internal_fn_supported_p
This fixes vectorized_internal_fn_supported_p behavior when
facing vector types with an integer mode.
2022-02-11 Richard Biener <rguenther@suse.de>
PR middle-end/104496
* internal-fn.cc (vectorized_internal_fn_supported_p):
Bail out for integer mode vector types.
* gcc.target/i386/pr104496.c: New testcase.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/104496] [12 Regression] ICE: in as_a, at machmode.h:365 with -O -mgeneral-regs-only -msse
2022-02-11 5:45 [Bug target/104496] New: [12 Regression] ICE: in as_a, at machmode.h:365 with -O -mgeneral-regs-only -msse zsojka at seznam dot cz
` (4 preceding siblings ...)
2022-02-11 10:28 ` cvs-commit at gcc dot gnu.org
@ 2022-02-11 10:55 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-02-11 10:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104496
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-02-11 10:55 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-11 5:45 [Bug target/104496] New: [12 Regression] ICE: in as_a, at machmode.h:365 with -O -mgeneral-regs-only -msse zsojka at seznam dot cz
2022-02-11 6:52 ` [Bug target/104496] " crazylht at gmail dot com
2022-02-11 7:40 ` crazylht at gmail dot com
2022-02-11 7:44 ` crazylht at gmail dot com
2022-02-11 9:24 ` rguenth at gcc dot gnu.org
2022-02-11 10:28 ` cvs-commit at gcc dot gnu.org
2022-02-11 10:55 ` 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).