Ok to backport GCC 13. You could disscuss with Pan Li whether you backport it or he backport it.
Thanks. juzhe.zh...@rivai.ai From: Li Xu Date: 2023-08-22 10:42 To: xuli1; gcc-patches CC: kito.cheng; palmer; juzhe.zhong Subject: Re: [PATCH] RISCV: Fix PR111074 [GCC13 BUG] The test case is too complicated and I can't simplify it, so no test case is added. -------------- Li Xu >From: xuli <xu...@eswincomputing.com> > >This patch fixes this issue happens on GCC-13. >https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111074 > >This patch should be backported to GCC-13. >GCC-14 has rewritten propagate_avl function, so there is no issue. > >PR target/111074 > >gcc/ChangeLog: > > * config/riscv/riscv-vsetvl.cc (extract_single_source): Fix bug. >--- > gcc/config/riscv/riscv-vsetvl.cc | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/gcc/config/riscv/riscv-vsetvl.cc >b/gcc/config/riscv/riscv-vsetvl.cc >index 789eb04b78d..bd45cb97e63 100644 >--- a/gcc/config/riscv/riscv-vsetvl.cc >+++ b/gcc/config/riscv/riscv-vsetvl.cc >@@ -1183,6 +1183,9 @@ extract_single_source (set_info *set) > return nullptr; > hash_set<set_info *> sets = get_all_sets (set, true, false, true); > >+ if (sets.is_empty ()) >+ return nullptr; >+ > insn_info *first_insn = (*sets.begin ())->insn (); > if (first_insn->is_artificial ()) > return nullptr; >-- >2.17.1