public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/112366] New: ICE in vectorizable_live_operation, at tree-vect-loop.cc:10798
@ 2023-11-03 8:20 lehua.ding at rivai dot ai
2023-11-03 8:33 ` [Bug tree-optimization/112366] " rguenth at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: lehua.ding at rivai dot ai @ 2023-11-03 8:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112366
Bug ID: 112366
Summary: ICE in vectorizable_live_operation, at
tree-vect-loop.cc:10798
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: lehua.ding at rivai dot ai
Target Milestone: ---
Created attachment 56499
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56499&action=edit
sm3.i
Compiler command to reproduce the ICE: riscv64-unknown-elf-gcc -O3
-fno-vect-cost-model --param=riscv-autovec-preference=fixed-vlmax
-march=rv64gcv_zknd_zkne_zknh_zksed_zksh_zbkb -mabi=lp64d sm3.i -S
ICE:
during GIMPLE pass: slp
sm3/zscrypto_rv64/sm3.c: In function 'sm3_compress':
sm3/zscrypto_rv64/sm3.c:56:6: internal compiler error: in
vectorizable_live_operation, at tree-vect-loop.cc:10798
56 | void sm3_compress(uint32_t s[24]) {
| ^~~~~~~~~~~~
0x143f0b2 vectorizable_live_operation(vec_info*, _stmt_vec_info*, _slp_tree*,
_slp_instance*, int, bool, vec<stmt_info_for_cost, va_heap, vl_ptr>*)
../../../../gcc/gcc/tree-vect-loop.cc:10795
0x23f1c23 can_vectorize_live_stmts
../../../../gcc/gcc/tree-vect-stmts.cc:12728
0x2424909 vect_transform_stmt(vec_info*, _stmt_vec_info*,
gimple_stmt_iterator*, _slp_tree*, _slp_instance*)
../../../../gcc/gcc/tree-vect-stmts.cc:13129
0x1464c02 vect_schedule_slp_node
../../../../gcc/gcc/tree-vect-slp.cc:9216
0x147c886 vect_schedule_scc
../../../../gcc/gcc/tree-vect-slp.cc:9451
0x147cdb6 vect_schedule_slp(vec_info*, vec<_slp_instance*, va_heap, vl_ptr>
const&)
../../../../gcc/gcc/tree-vect-slp.cc:9596
0x147f3ee vect_slp_region
../../../../gcc/gcc/tree-vect-slp.cc:7751
0x1480c2d vect_slp_bbs
../../../../gcc/gcc/tree-vect-slp.cc:7851
0x148137b vect_slp_function(function*)
../../../../gcc/gcc/tree-vect-slp.cc:7973
0x148d646 execute
../../../../gcc/gcc/tree-vectorizer.cc:1531
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/112366] ICE in vectorizable_live_operation, at tree-vect-loop.cc:10798
2023-11-03 8:20 [Bug middle-end/112366] New: ICE in vectorizable_live_operation, at tree-vect-loop.cc:10798 lehua.ding at rivai dot ai
@ 2023-11-03 8:33 ` rguenth at gcc dot gnu.org
2023-11-03 10:18 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-11-03 8:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112366
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Status|UNCONFIRMED |ASSIGNED
Keywords| |ice-checking
Last reconfirmed| |2023-11-03
Component|middle-end |tree-optimization
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I'll have a look, the assert isn't really important.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/112366] ICE in vectorizable_live_operation, at tree-vect-loop.cc:10798
2023-11-03 8:20 [Bug middle-end/112366] New: ICE in vectorizable_live_operation, at tree-vect-loop.cc:10798 lehua.ding at rivai dot ai
2023-11-03 8:33 ` [Bug tree-optimization/112366] " rguenth at gcc dot gnu.org
@ 2023-11-03 10:18 ` rguenth at gcc dot gnu.org
2023-11-03 10:30 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-11-03 10:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112366
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
(gdb) p code
$1 = BIT_XOR_EXPR
OK, that's somewhat unexpected ;) Reduced testcase:
int sm3_compress___trans_tmp_1, sm3_compress_x_6;
extern int sm3_compress_x[];
void sm3_compress()
{
for (int i = 0; i < 12; ++i)
{
int tt2 = sm3_compress_x[4] ^ sm3_compress_x[5] ^ sm3_compress_x_6;
sm3_compress___trans_tmp_1 = sm3_compress_x[5];
sm3_compress_x_6 = sm3_compress___trans_tmp_1;
sm3_compress_x[5] = sm3_compress_x[4];
long rd;
__asm__("" : "=r"(rd) : ""(tt2));
sm3_compress_x[4] = rd;
}
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/112366] ICE in vectorizable_live_operation, at tree-vect-loop.cc:10798
2023-11-03 8:20 [Bug middle-end/112366] New: ICE in vectorizable_live_operation, at tree-vect-loop.cc:10798 lehua.ding at rivai dot ai
2023-11-03 8:33 ` [Bug tree-optimization/112366] " rguenth at gcc dot gnu.org
2023-11-03 10:18 ` rguenth at gcc dot gnu.org
@ 2023-11-03 10:30 ` rguenth at gcc dot gnu.org
2023-11-03 11:01 ` cvs-commit at gcc dot gnu.org
2023-11-03 11:02 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-11-03 10:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112366
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
_33 = (int) rd_27;
...
_103 = _93 ^ _33; <--- use of _33
...
__asm__("" : "=r" rd_41 : "" tt2_40);
_113 = {rd_27, rd_41};
vect__33.17_123 = (vector(2) int) _113;
_133 = BIT_FIELD_REF <vect__33.17_123, 32, 0>;
_42 = (int) rd_41;
and here's the vector result of the conversion. The { rd_27, rd_41 }
CTOR can appear only after the last scalar def but there are other
uses of the components earlier.
The other uses are not really constrained in any way, so the assert is
bougs. I'll just remove it.
Ideally we'd avoid having any scalar ops participating in the SLP that
dominate any of the external defs (as traditionally external defs happen
before the vector code, not interleaved as we have it here after we
build operands from scalar defs from inside the vectorized region).
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/112366] ICE in vectorizable_live_operation, at tree-vect-loop.cc:10798
2023-11-03 8:20 [Bug middle-end/112366] New: ICE in vectorizable_live_operation, at tree-vect-loop.cc:10798 lehua.ding at rivai dot ai
` (2 preceding siblings ...)
2023-11-03 10:30 ` rguenth at gcc dot gnu.org
@ 2023-11-03 11:01 ` cvs-commit at gcc dot gnu.org
2023-11-03 11:02 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-11-03 11:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112366
--- Comment #4 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:c0cf9b78573d3d353f22e5dd1c32fecdbca703b8
commit r14-5100-gc0cf9b78573d3d353f22e5dd1c32fecdbca703b8
Author: Richard Biener <rguenther@suse.de>
Date: Fri Nov 3 11:31:37 2023 +0100
tree-optimization/112366 - remove assert for failed live lane code gen
The following removes a bogus assert constraining the uses that
could appear when a built from scalar defs SLP node constrains
code generation in a way so earlier uses of the vector CTOR
components fail to get vectorized. We can't really constrain the
operation such use appears in.
PR tree-optimization/112366
* tree-vect-loop.cc (vectorizable_live_operation): Remove
assert.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/112366] ICE in vectorizable_live_operation, at tree-vect-loop.cc:10798
2023-11-03 8:20 [Bug middle-end/112366] New: ICE in vectorizable_live_operation, at tree-vect-loop.cc:10798 lehua.ding at rivai dot ai
` (3 preceding siblings ...)
2023-11-03 11:01 ` cvs-commit at gcc dot gnu.org
@ 2023-11-03 11:02 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-11-03 11:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112366
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-11-03 11:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-03 8:20 [Bug middle-end/112366] New: ICE in vectorizable_live_operation, at tree-vect-loop.cc:10798 lehua.ding at rivai dot ai
2023-11-03 8:33 ` [Bug tree-optimization/112366] " rguenth at gcc dot gnu.org
2023-11-03 10:18 ` rguenth at gcc dot gnu.org
2023-11-03 10:30 ` rguenth at gcc dot gnu.org
2023-11-03 11:01 ` cvs-commit at gcc dot gnu.org
2023-11-03 11:02 ` 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).