public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/111927] New: RISC-V: internal compiler error: in merge, at config/riscv/riscv-vsetvl.cc:1997
@ 2023-10-23  6:39 fanghuaqi at vip dot qq.com
  2023-10-23  6:45 ` [Bug target/111927] " juzhe.zhong at rivai dot ai
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: fanghuaqi at vip dot qq.com @ 2023-10-23  6:39 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111927
           Summary: RISC-V: internal compiler error: in merge, at
                    config/riscv/riscv-vsetvl.cc:1997
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fanghuaqi at vip dot qq.com
  Target Milestone: ---

Created attachment 56173
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56173&action=edit
bug file compiled by risc-v rvv compiler

Hi, I met an issue when compile code attached using risc-v gcc
compiler(-march=rv64imafc_zve64f  -mabi=lp64f -O2) from master branch, and it
throw issue like below:

during RTL pass: vsetvl
<source>: In function 'riscv_lms_f32':
<source>:240:1: internal compiler error: in merge, at
config/riscv/riscv-vsetvl.cc:1997
  240 | }
      | ^
0x7ff32c9c0082 __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

Checked with gcc 13.2.0 and clang truck it both works well.

You can also check it in https://godbolt.org/z/4drnazzaf

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

* [Bug target/111927] RISC-V: internal compiler error: in merge, at config/riscv/riscv-vsetvl.cc:1997
  2023-10-23  6:39 [Bug target/111927] New: RISC-V: internal compiler error: in merge, at config/riscv/riscv-vsetvl.cc:1997 fanghuaqi at vip dot qq.com
@ 2023-10-23  6:45 ` juzhe.zhong at rivai dot ai
  2023-10-23  6:49 ` fanghuaqi at vip dot qq.com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: juzhe.zhong at rivai dot ai @ 2023-10-23  6:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from JuzheZhong <juzhe.zhong at rivai dot ai> ---
Confirm VSETVL PASS issue.

We just refactored it recently.

I will fix it. Thanks for report it.

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

* [Bug target/111927] RISC-V: internal compiler error: in merge, at config/riscv/riscv-vsetvl.cc:1997
  2023-10-23  6:39 [Bug target/111927] New: RISC-V: internal compiler error: in merge, at config/riscv/riscv-vsetvl.cc:1997 fanghuaqi at vip dot qq.com
  2023-10-23  6:45 ` [Bug target/111927] " juzhe.zhong at rivai dot ai
@ 2023-10-23  6:49 ` fanghuaqi at vip dot qq.com
  2023-10-23 10:00 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: fanghuaqi at vip dot qq.com @ 2023-10-23  6:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Huaqi <fanghuaqi at vip dot qq.com> ---
(In reply to JuzheZhong from comment #1)
> Confirm VSETVL PASS issue.
> 
> We just refactored it recently.
> 
> I will fix it. Thanks for report it.

Thanks for your reply, wait for the refactorization finished.

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

* [Bug target/111927] RISC-V: internal compiler error: in merge, at config/riscv/riscv-vsetvl.cc:1997
  2023-10-23  6:39 [Bug target/111927] New: RISC-V: internal compiler error: in merge, at config/riscv/riscv-vsetvl.cc:1997 fanghuaqi at vip dot qq.com
  2023-10-23  6:45 ` [Bug target/111927] " juzhe.zhong at rivai dot ai
  2023-10-23  6:49 ` fanghuaqi at vip dot qq.com
@ 2023-10-23 10:00 ` cvs-commit at gcc dot gnu.org
  2023-10-23 10:02 ` juzhe.zhong at rivai dot ai
  2023-10-23 10:33 ` fanghuaqi at vip dot qq.com
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-10-23 10:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Pan Li <panli@gcc.gnu.org>:

https://gcc.gnu.org/g:0c4bd1321a6def5eb44c530e83b01a415633b660

commit r14-4856-g0c4bd1321a6def5eb44c530e83b01a415633b660
Author: Juzhe-Zhong <juzhe.zhong@rivai.ai>
Date:   Mon Oct 23 17:40:34 2023 +0800

    RISC-V: Fix ICE for the fusion case from vsetvl to scalar move[PR111927]

    ICE:

    during RTL pass: vsetvl
    <source>: In function 'riscv_lms_f32':
    <source>:240:1: internal compiler error: in merge, at
config/riscv/riscv-vsetvl.cc:1997
      240 | }

    In general compatible_p (avl_equal_p) has:

        if (next.has_vl () && next.vl_used_by_non_rvv_insn_p ())
          return false;

    Don't fuse AVL of vsetvl if the VL operand is used by non-RVV instructions.

    It is reasonable to add it into 'can_use_next_avl_p' since we don't want to
    fuse AVL of vsetvl into a scalar move instruction which doesn't demand AVL.
    And after the fusion, we will alway use compatible_p to check whether the
demand
    is correct or not.

            PR target/111927

    gcc/ChangeLog:

            * config/riscv/riscv-vsetvl.cc: Fix bug.

    gcc/testsuite/ChangeLog:

            * gcc.target/riscv/rvv/vsetvl/pr111927.c: New test.

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

* [Bug target/111927] RISC-V: internal compiler error: in merge, at config/riscv/riscv-vsetvl.cc:1997
  2023-10-23  6:39 [Bug target/111927] New: RISC-V: internal compiler error: in merge, at config/riscv/riscv-vsetvl.cc:1997 fanghuaqi at vip dot qq.com
                   ` (2 preceding siblings ...)
  2023-10-23 10:00 ` cvs-commit at gcc dot gnu.org
@ 2023-10-23 10:02 ` juzhe.zhong at rivai dot ai
  2023-10-23 10:33 ` fanghuaqi at vip dot qq.com
  4 siblings, 0 replies; 6+ messages in thread
From: juzhe.zhong at rivai dot ai @ 2023-10-23 10:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from JuzheZhong <juzhe.zhong at rivai dot ai> ---
Fixed on trunk. Plz verify it and close it if it is fixed.

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

* [Bug target/111927] RISC-V: internal compiler error: in merge, at config/riscv/riscv-vsetvl.cc:1997
  2023-10-23  6:39 [Bug target/111927] New: RISC-V: internal compiler error: in merge, at config/riscv/riscv-vsetvl.cc:1997 fanghuaqi at vip dot qq.com
                   ` (3 preceding siblings ...)
  2023-10-23 10:02 ` juzhe.zhong at rivai dot ai
@ 2023-10-23 10:33 ` fanghuaqi at vip dot qq.com
  4 siblings, 0 replies; 6+ messages in thread
From: fanghuaqi at vip dot qq.com @ 2023-10-23 10:33 UTC (permalink / raw)
  To: gcc-bugs

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

Huaqi <fanghuaqi at vip dot qq.com> changed:

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

--- Comment #5 from Huaqi <fanghuaqi at vip dot qq.com> ---
Yes, I tried with latest commit
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=0c4bd1321a6def5eb44c530e83b01a415633b660,
it works now.

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

end of thread, other threads:[~2023-10-23 10:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-23  6:39 [Bug target/111927] New: RISC-V: internal compiler error: in merge, at config/riscv/riscv-vsetvl.cc:1997 fanghuaqi at vip dot qq.com
2023-10-23  6:45 ` [Bug target/111927] " juzhe.zhong at rivai dot ai
2023-10-23  6:49 ` fanghuaqi at vip dot qq.com
2023-10-23 10:00 ` cvs-commit at gcc dot gnu.org
2023-10-23 10:02 ` juzhe.zhong at rivai dot ai
2023-10-23 10:33 ` fanghuaqi at vip dot qq.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).