public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/111412] New: [release/gcc13 bug]RISC-V:ICE in phase 6 of vsetvl pass
@ 2023-09-14 9:05 xuli1 at eswincomputing dot com
2023-09-18 7:14 ` [Bug target/111412] RISC-V:ICE " cvs-commit at gcc dot gnu.org
2023-09-18 8:13 ` kito at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: xuli1 at eswincomputing dot com @ 2023-09-14 9:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111412
Bug ID: 111412
Summary: [release/gcc13 bug]RISC-V:ICE in phase 6 of vsetvl
pass
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: xuli1 at eswincomputing dot com
Target Milestone: ---
Created attachment 55899
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55899&action=edit
testcase
Compile the code using -march=rv64gcv -mabi=lp64d -O2:
test:
beq a0,zero,.L2
lui a5,%hi(.LC0)
flw fa4,%lo(.LC0)(a5)
fmv.s.x fa5,zero
li a3,1
vfmv.v.f v1,fa4 --> The vsetvl instruction was not set before
this,causing Illegal instruction (core
dumped)
.L5:
slli a5,a3,32
srli a5,a5,32
vsetvli a5,a5,e32,m8,ta,mu
beq a5,zero,.L3
mv a4,a3
.....
Solution:
vsetvl pass has been refactored in gcc14, and the optimization process is more
reasonable than gcc13. This problem does not exist in gcc14.
Phase 6 of gcc13 is an optimization patch. Due to lack of consideration,
there will be some hidden bugs, so we decided to remove phase 6.
Although the generated code will be redundant,the program is correct.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug target/111412] RISC-V:ICE in phase 6 of vsetvl pass
2023-09-14 9:05 [Bug target/111412] New: [release/gcc13 bug]RISC-V:ICE in phase 6 of vsetvl pass xuli1 at eswincomputing dot com
@ 2023-09-18 7:14 ` cvs-commit at gcc dot gnu.org
2023-09-18 8:13 ` kito at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-18 7:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111412
--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Li Xu <xuli@gcc.gnu.org>:
https://gcc.gnu.org/g:10c7edcc65d4bf1d05a9f0791e77e7b953e3e796
commit r13-7822-g10c7edcc65d4bf1d05a9f0791e77e7b953e3e796
Author: xuli <xuli1@eswincomputing.com>
Date: Mon Sep 18 04:02:52 2023 +0000
RISC-V: Remove phase 6 of vsetvl pass in GCC13[PR111412]
vsetvl pass has been refactored in gcc14, and the optimization
is more reasonable than releases/gcc-13. This problem does not
exist in gcc14.
Phase 6 of gcc13 is an optimization patch. Due to lack of consideration,
there will be some hidden bugs, so we decided to remove phase 6.
Although the generated code will be redundant, the program is correct.
PR target/111412
gcc/ChangeLog:
* config/riscv/riscv-vsetvl.cc (vector_infos_manager::release):
Remove.
(pass_vsetvl::refine_vsetvls): Ditto.
(pass_vsetvl::cleanup_vsetvls): Ditto.
(pass_vsetvl::propagate_avl): Ditto.
(pass_vsetvl::lazy_vsetvl): Ditto.
* config/riscv/riscv-vsetvl.h: Ditto.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/vsetvl/avl_single-79.c: Adjust case.
* gcc.target/riscv/rvv/vsetvl/avl_single-80.c: Ditto.
* gcc.target/riscv/rvv/vsetvl/avl_single-86.c: Ditto.
* gcc.target/riscv/rvv/vsetvl/avl_single-87.c: Ditto.
* gcc.target/riscv/rvv/vsetvl/avl_single-88.c: Ditto.
* gcc.target/riscv/rvv/vsetvl/avl_single-89.c: Ditto.
* gcc.target/riscv/rvv/vsetvl/avl_single-90.c: Ditto.
* gcc.target/riscv/rvv/vsetvl/vlmax_back_prop-25.c: Ditto.
* gcc.target/riscv/rvv/vsetvl/vlmax_back_prop-26.c: Ditto.
* gcc.target/riscv/rvv/vsetvl/vlmax_switch_vtype-14.c: Ditto.
* gcc.target/riscv/rvv/vsetvl/vlmax_switch_vtype-15.c: Ditto.
* gcc.target/riscv/rvv/vsetvl/vsetvl-1.c: Ditto.
* gcc.target/riscv/rvv/vsetvl/vsetvl-5.c: Ditto.
* gcc.target/riscv/rvv/vsetvl/vsetvl-6.c: Ditto.
* gcc.target/riscv/rvv/vsetvl/vsetvl-7.c: Ditto.
* gcc.target/riscv/rvv/vsetvl/vsetvl-8.c: Ditto.
* gcc.target/riscv/rvv/vsetvl/vsetvlmax-2.c: Ditto.
* gcc.target/riscv/rvv/vsetvl/vsetvlmax-4.c: Ditto.
* gcc.target/riscv/rvv/base/pr111412.c: New test.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug target/111412] RISC-V:ICE in phase 6 of vsetvl pass
2023-09-14 9:05 [Bug target/111412] New: [release/gcc13 bug]RISC-V:ICE in phase 6 of vsetvl pass xuli1 at eswincomputing dot com
2023-09-18 7:14 ` [Bug target/111412] RISC-V:ICE " cvs-commit at gcc dot gnu.org
@ 2023-09-18 8:13 ` kito at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: kito at gcc dot gnu.org @ 2023-09-18 8:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111412
Kito Cheng <kito at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|UNCONFIRMED |RESOLVED
CC| |kito at gcc dot gnu.org
--- Comment #2 from Kito Cheng <kito at gcc dot gnu.org> ---
fixed
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-18 8:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-14 9:05 [Bug target/111412] New: [release/gcc13 bug]RISC-V:ICE in phase 6 of vsetvl pass xuli1 at eswincomputing dot com
2023-09-18 7:14 ` [Bug target/111412] RISC-V:ICE " cvs-commit at gcc dot gnu.org
2023-09-18 8:13 ` 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).