public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/114195] New: [14] RISC-V vector ICE: in vectorizable_store, at tree-vect-stmts.cc:8690
@ 2024-03-01 21:07 patrick at rivosinc dot com
  2024-03-06 14:44 ` [Bug middle-end/114195] " pan2.li at intel dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: patrick at rivosinc dot com @ 2024-03-01 21:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114195

            Bug ID: 114195
           Summary: [14] RISC-V vector ICE: in vectorizable_store, at
                    tree-vect-stmts.cc:8690
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: patrick at rivosinc dot com
  Target Milestone: ---

Created attachment 57588
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57588&action=edit
-freport-bug output

Testcase:
long a, b;
extern short c[];
void d() {
  for (int e = 0; e < 5; e += 2) {
    a = ({ a < 0 ? a : 0; });
    b = ({ b < 0 ? b : 0; });
    c[e] = 0;
  }
}

Backtrace:
> /scratch/tc-testing/tc-feb-20/build-rv64gcv/bin/riscv64-unknown-linux-gnu-gcc -march=rv64gcv -O3 red.c
during GIMPLE pass: vect
red.c: In function 'd':
red.c:3:6: internal compiler error: in vectorizable_store, at
tree-vect-stmts.cc:8690
    3 | void d() {
      |      ^
0xbe592a vectorizable_store
        ../../../gcc/gcc/tree-vect-stmts.cc:8690
0x274ff35 vect_analyze_stmt(vec_info*, _stmt_vec_info*, bool*, _slp_tree*,
_slp_instance*, vec<stmt_info_for_cost, va_heap, vl_ptr>*)
        ../../../gcc/gcc/tree-vect-stmts.cc:13241
0x15de0e2 vect_analyze_loop_operations
        ../../../gcc/gcc/tree-vect-loop.cc:2208
0x15de0e2 vect_analyze_loop_2
        ../../../gcc/gcc/tree-vect-loop.cc:3041
0x15dfdf0 vect_analyze_loop_1
        ../../../gcc/gcc/tree-vect-loop.cc:3481
0x15e0589 vect_analyze_loop(loop*, vec_info_shared*)
        ../../../gcc/gcc/tree-vect-loop.cc:3639
0x1627ed4 try_vectorize_loop_1
        ../../../gcc/gcc/tree-vectorizer.cc:1066
0x1627ed4 try_vectorize_loop
        ../../../gcc/gcc/tree-vectorizer.cc:1182
0x16287fc execute
        ../../../gcc/gcc/tree-vectorizer.cc:1298
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.

Godbolt: https://godbolt.org/z/s9YbYhK8e

Tested/found using r14-9084-g61ab046a327 (not bisected)

Found via fuzzer.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug middle-end/114195] [14] RISC-V vector ICE: in vectorizable_store, at tree-vect-stmts.cc:8690
  2024-03-01 21:07 [Bug target/114195] New: [14] RISC-V vector ICE: in vectorizable_store, at tree-vect-stmts.cc:8690 patrick at rivosinc dot com
@ 2024-03-06 14:44 ` pan2.li at intel dot com
  2024-03-07  6:10 ` pan2.li at intel dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pan2.li at intel dot com @ 2024-03-06 14:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114195

--- Comment #1 from Li Pan <pan2.li at intel dot com> ---
Confirmed with
  1. build option '-march=rv64gcv -O3'.
  2. riscv64-unknown-elf-gcc (GCC) 14.0.1 20240306 (experimental).

If no one works on this ICE already, will take a look into it.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug middle-end/114195] [14] RISC-V vector ICE: in vectorizable_store, at tree-vect-stmts.cc:8690
  2024-03-01 21:07 [Bug target/114195] New: [14] RISC-V vector ICE: in vectorizable_store, at tree-vect-stmts.cc:8690 patrick at rivosinc dot com
  2024-03-06 14:44 ` [Bug middle-end/114195] " pan2.li at intel dot com
@ 2024-03-07  6:10 ` pan2.li at intel dot com
  2024-03-07 11:30 ` pan2.li at intel dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pan2.li at intel dot com @ 2024-03-07  6:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114195

--- Comment #2 from Li Pan <pan2.li at intel dot com> ---
Trigger below assert in vectorizable_store, the loop_vinfo use_partial,
fully_masked and fully_lens are all true here.

/* Shouldn't go with length-based approach if fully masked.  */
gcc_assert (!loop_lens || !loop_masks);

Introduce by this commit
https://github.com/gcc-mirror/gcc/commit/9fb832ce382d649b7687426e6bc4e5d3715cb78a#diff-97f675a4f401d6ec84d031e0d7259a0b6ba3b50eccc3fe483e9376becc9d9cf9

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug middle-end/114195] [14] RISC-V vector ICE: in vectorizable_store, at tree-vect-stmts.cc:8690
  2024-03-01 21:07 [Bug target/114195] New: [14] RISC-V vector ICE: in vectorizable_store, at tree-vect-stmts.cc:8690 patrick at rivosinc dot com
  2024-03-06 14:44 ` [Bug middle-end/114195] " pan2.li at intel dot com
  2024-03-07  6:10 ` pan2.li at intel dot com
@ 2024-03-07 11:30 ` pan2.li at intel dot com
  2024-03-10 11:07 ` pan2.li at intel dot com
  2024-03-11 16:29 ` patrick at rivosinc dot com
  4 siblings, 0 replies; 6+ messages in thread
From: pan2.li at intel dot com @ 2024-03-07 11:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114195

--- Comment #3 from Li Pan <pan2.li at intel dot com> ---
Testing a fix for possible regression.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug middle-end/114195] [14] RISC-V vector ICE: in vectorizable_store, at tree-vect-stmts.cc:8690
  2024-03-01 21:07 [Bug target/114195] New: [14] RISC-V vector ICE: in vectorizable_store, at tree-vect-stmts.cc:8690 patrick at rivosinc dot com
                   ` (2 preceding siblings ...)
  2024-03-07 11:30 ` pan2.li at intel dot com
@ 2024-03-10 11:07 ` pan2.li at intel dot com
  2024-03-11 16:29 ` patrick at rivosinc dot com
  4 siblings, 0 replies; 6+ messages in thread
From: pan2.li at intel dot com @ 2024-03-10 11:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114195

--- Comment #4 from Li Pan <pan2.li at intel dot com> ---
Hi Patrick,

Could you please help to double-check if upstream has this problem? As well as
PR114198.

Thanks.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug middle-end/114195] [14] RISC-V vector ICE: in vectorizable_store, at tree-vect-stmts.cc:8690
  2024-03-01 21:07 [Bug target/114195] New: [14] RISC-V vector ICE: in vectorizable_store, at tree-vect-stmts.cc:8690 patrick at rivosinc dot com
                   ` (3 preceding siblings ...)
  2024-03-10 11:07 ` pan2.li at intel dot com
@ 2024-03-11 16:29 ` patrick at rivosinc dot com
  4 siblings, 0 replies; 6+ messages in thread
From: patrick at rivosinc dot com @ 2024-03-11 16:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114195

Patrick O'Neill <patrick at rivosinc dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #5 from Patrick O'Neill <patrick at rivosinc dot com> ---
Fixed - Thank you!

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-03-11 16:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-01 21:07 [Bug target/114195] New: [14] RISC-V vector ICE: in vectorizable_store, at tree-vect-stmts.cc:8690 patrick at rivosinc dot com
2024-03-06 14:44 ` [Bug middle-end/114195] " pan2.li at intel dot com
2024-03-07  6:10 ` pan2.li at intel dot com
2024-03-07 11:30 ` pan2.li at intel dot com
2024-03-10 11:07 ` pan2.li at intel dot com
2024-03-11 16:29 ` patrick at rivosinc dot com

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).