public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "juzhe.zhong at rivai dot ai" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/113420] New: risc-v vector: ICE when using C compiler compile C++ RVV intrinsics
Date: Tue, 16 Jan 2024 11:23:28 +0000	[thread overview]
Message-ID: <bug-113420-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 113420
           Summary: risc-v vector: ICE when using C compiler compile C++
                    RVV intrinsics
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: juzhe.zhong at rivai dot ai
  Target Milestone: ---

#include <riscv_vector.h>

void matrix_transpose_intrinsics(float *dst, float *src, size_t n) 
{
    for (size_t row_id = 0; row_id < n; ++row_id) { // input row-index
        size_t avl = n;
        // source pointer to row_id-th row
        float* row_src = src + row_id * n;
        // destination pointer to row_id-th column
        float* row_dst = dst + row_id;
        while (avl > 0) {
            size_t vl = __riscv_vsetvl_e32m1(avl);
            vfloat32m1_t row = __riscv_vle32_v_f32m1(row_src, vl);
            __riscv_vsse32(row_dst, sizeof(float) * n, row, vl);
            // updating application vector length
            avl -= vl;
            // updating source and destination pointers
            row_src += vl;
            row_dst += vl * n;
        }
    }
}

<source>: In function 'matrix_transpose_intrinsics':
<source>:14:13: internal compiler error: in resolve_overloaded_builtin, at
config/riscv/riscv-vector-builtins.cc:4614
   14 |             __riscv_vsse32(row_dst, sizeof(float) * n, row, vl);
      |             ^~~~~~~~~~~~~~
0x7fbb66a29e3f __libc_start_main
        ???:0
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.
Compiler returned: 1

             reply	other threads:[~2024-01-16 11:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-16 11:23 juzhe.zhong at rivai dot ai [this message]
2024-01-22  6:48 ` [Bug target/113420] " cvs-commit at gcc dot gnu.org
2024-01-22  7:12 ` juzhe.zhong at rivai dot ai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-113420-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).