* [PATCH] RISCV: Fix PR111074 [GCC13 BUG]
@ 2023-08-22 2:29 Li Xu
2023-08-22 2:40 ` juzhe.zhong
2023-08-22 2:42 ` Li Xu
0 siblings, 2 replies; 5+ messages in thread
From: Li Xu @ 2023-08-22 2:29 UTC (permalink / raw)
To: gcc-patches; +Cc: kito.cheng, palmer, juzhe.zhong, xuli
From: xuli <xuli1@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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] RISCV: Fix PR111074 [GCC13 BUG]
2023-08-22 2:29 [PATCH] RISCV: Fix PR111074 [GCC13 BUG] Li Xu
@ 2023-08-22 2:40 ` juzhe.zhong
2023-08-22 2:42 ` Li Xu
1 sibling, 0 replies; 5+ messages in thread
From: juzhe.zhong @ 2023-08-22 2:40 UTC (permalink / raw)
To: Li Xu, gcc-patches; +Cc: kito.cheng, palmer, Li Xu
[-- Attachment #1: Type: text/plain, Size: 1311 bytes --]
Thanks for fixing it.
I am wonder could you add testcase into the patch?
Or the testcase is too big and not appropriate to add.
juzhe.zhong@rivai.ai
From: Li Xu
Date: 2023-08-22 10:29
To: gcc-patches
CC: kito.cheng; palmer; juzhe.zhong; xuli
Subject: [PATCH] RISCV: Fix PR111074 [GCC13 BUG]
From: xuli <xuli1@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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] RISCV: Fix PR111074 [GCC13 BUG]
2023-08-22 2:29 [PATCH] RISCV: Fix PR111074 [GCC13 BUG] Li Xu
2023-08-22 2:40 ` juzhe.zhong
@ 2023-08-22 2:42 ` Li Xu
2023-08-22 2:44 ` juzhe.zhong
2023-08-22 7:28 ` Li Xu
1 sibling, 2 replies; 5+ messages in thread
From: Li Xu @ 2023-08-22 2:42 UTC (permalink / raw)
To: xuli1, gcc-patches; +Cc: kito.cheng, palmer, juzhe.zhong
The test case is too complicated and I can't simplify it, so no test case is added.
--------------
Li Xu
>From: xuli <xuli1@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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re: [PATCH] RISCV: Fix PR111074 [GCC13 BUG]
2023-08-22 2:42 ` Li Xu
@ 2023-08-22 2:44 ` juzhe.zhong
2023-08-22 7:28 ` Li Xu
1 sibling, 0 replies; 5+ messages in thread
From: juzhe.zhong @ 2023-08-22 2:44 UTC (permalink / raw)
To: Li Xu, gcc-patches; +Cc: kito.cheng, palmer, pan2.li
[-- Attachment #1: Type: text/plain, Size: 1426 bytes --]
Ok to backport GCC 13.
You could disscuss with Pan Li whether you backport it or he backport it.
Thanks.
juzhe.zhong@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 <xuli1@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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re: [PATCH] RISCV: Fix PR111074 [GCC13 BUG]
2023-08-22 2:42 ` Li Xu
2023-08-22 2:44 ` juzhe.zhong
@ 2023-08-22 7:28 ` Li Xu
1 sibling, 0 replies; 5+ messages in thread
From: Li Xu @ 2023-08-22 7:28 UTC (permalink / raw)
To: xuli1, gcc-patches; +Cc: kito.cheng, palmer, juzhe.zhong
Committed, thanks all.
--------------
Li Xu
>The test case is too complicated and I can't simplify it, so no test case is added.
>
>--------------
>Li Xu
>>From: xuli <xuli1@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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-08-22 7:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-22 2:29 [PATCH] RISCV: Fix PR111074 [GCC13 BUG] Li Xu
2023-08-22 2:40 ` juzhe.zhong
2023-08-22 2:42 ` Li Xu
2023-08-22 2:44 ` juzhe.zhong
2023-08-22 7:28 ` Li Xu
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).