public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/111935] New: gcc ICE with risc-v vector intrinsics
@ 2023-10-23 12:52 julienpommier at free dot fr
  2023-10-23 17:08 ` [Bug target/111935] " pinskia at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: julienpommier at free dot fr @ 2023-10-23 12:52 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111935
           Summary: gcc ICE with risc-v vector intrinsics
           Product: gcc
           Version: 13.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: julienpommier at free dot fr
  Target Milestone: ---

The following code (test.c) crashes the riscv gcc 13.2.0 compiler of ubuntu
23.10:

#include <riscv_vector.h>

inline vuint32m4_t __attribute__((__always_inline__)) transpose_indexes() {
  static const uint32_t idx_[16] = {0, 4, 8, 12,
                      1, 5, 9, 13,
                      2, 6, 10, 14,
                      3, 7, 11, 15};
  return __riscv_vle32_v_u32m4(idx_, 16);
}

void pffft_real_preprocess_4x4(const float *in) {
  vfloat32m1_t r0=__riscv_vle32_v_f32m1(in,4);
  vfloat32m4_t tmp = __riscv_vundefined_f32m4();
  tmp = __riscv_vset_v_f32m1_f32m4(tmp, 0, r0);
  tmp = __riscv_vset_v_f32m1_f32m4(tmp, 1, r0);
  tmp = __riscv_vset_v_f32m1_f32m4(tmp, 2, r0);
  tmp = __riscv_vset_v_f32m1_f32m4(tmp, 3, r0);
  tmp = __riscv_vrgather_vv_f32m4(tmp, transpose_indexes(), 16);
  r0 = __riscv_vget_v_f32m4_f32m1(tmp, 0);
}



when compiled with:

riscv64-linux-gnu-gcc-13 -O1 -march=rv64gcv -c testcase.c

the output is:

during RTL pass: expand
test.c: In function ‘pffft_real_preprocess_4x4’:
test.c:19:8: internal compiler error: Segmentation fault
   19 |   r0 = __riscv_vget_v_f32m4_f32m1(tmp, 0);
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0xffffae3a7583 __libc_start_call_main
        ../sysdeps/nptl/libc_start_call_main.h:58
0xffffae3a7657 __libc_start_main_impl
        ../csu/libc-start.c:360
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-13/README.Bugs> for instructions.

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

end of thread, other threads:[~2024-04-24  8:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-23 12:52 [Bug c/111935] New: gcc ICE with risc-v vector intrinsics julienpommier at free dot fr
2023-10-23 17:08 ` [Bug target/111935] " pinskia at gcc dot gnu.org
2023-10-24  7:48 ` cvs-commit at gcc dot gnu.org
2023-10-31  2:50 ` cvs-commit at gcc dot gnu.org
2024-02-17  3:30 ` aoliva at gcc dot gnu.org
2024-04-24  8:59 ` kito 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).