* [PATCH] RISC-V: Fix bugs of available condition.
@ 2023-01-03 7:30 juzhe.zhong
2023-01-26 19:13 ` Kito Cheng
0 siblings, 1 reply; 2+ messages in thread
From: juzhe.zhong @ 2023-01-03 7:30 UTC (permalink / raw)
To: gcc-patches; +Cc: kito.cheng, palmer, Ju-Zhe Zhong
From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
Suppose there are 2 demand infos:
Demand 1: demand TAIL.
Demand 2: not demand TAIL.
If a block is demand 1, we should adjust this block is available both for demand 1 && 2.
However, if a block is demand 2, we should only adjust this block is available for demand 2 only.
gcc/ChangeLog:
* config/riscv/riscv-vsetvl.cc (vector_insn_info::operator>=): Fix available condition.
---
gcc/config/riscv/riscv-vsetvl.cc | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/gcc/config/riscv/riscv-vsetvl.cc b/gcc/config/riscv/riscv-vsetvl.cc
index 6dbaea32b03..52f0195980a 100644
--- a/gcc/config/riscv/riscv-vsetvl.cc
+++ b/gcc/config/riscv/riscv-vsetvl.cc
@@ -1048,12 +1048,10 @@ vector_insn_info::operator>= (const vector_insn_info &other) const
}
}
- if (demand_p (DEMAND_TAIL_POLICY) && !other.demand_p (DEMAND_TAIL_POLICY)
- && get_ta () != other.get_ta ())
+ if (!demand_p (DEMAND_TAIL_POLICY) && other.demand_p (DEMAND_TAIL_POLICY))
return false;
- if (demand_p (DEMAND_MASK_POLICY) && !other.demand_p (DEMAND_MASK_POLICY)
- && get_ma () != other.get_ma ())
+ if (!demand_p (DEMAND_MASK_POLICY) && other.demand_p (DEMAND_MASK_POLICY))
return false;
return true;
--
2.36.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] RISC-V: Fix bugs of available condition.
2023-01-03 7:30 [PATCH] RISC-V: Fix bugs of available condition juzhe.zhong
@ 2023-01-26 19:13 ` Kito Cheng
0 siblings, 0 replies; 2+ messages in thread
From: Kito Cheng @ 2023-01-26 19:13 UTC (permalink / raw)
To: juzhe.zhong; +Cc: gcc-patches, palmer
[-- Attachment #1: Type: text/plain, Size: 1463 bytes --]
committed, thanks.
On Tue, Jan 3, 2023 at 3:31 PM <juzhe.zhong@rivai.ai> wrote:
> From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
>
> Suppose there are 2 demand infos:
>
> Demand 1: demand TAIL.
> Demand 2: not demand TAIL.
>
> If a block is demand 1, we should adjust this block is available both for
> demand 1 && 2.
> However, if a block is demand 2, we should only adjust this block is
> available for demand 2 only.
>
> gcc/ChangeLog:
>
> * config/riscv/riscv-vsetvl.cc (vector_insn_info::operator>=): Fix
> available condition.
>
> ---
> gcc/config/riscv/riscv-vsetvl.cc | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/gcc/config/riscv/riscv-vsetvl.cc
> b/gcc/config/riscv/riscv-vsetvl.cc
> index 6dbaea32b03..52f0195980a 100644
> --- a/gcc/config/riscv/riscv-vsetvl.cc
> +++ b/gcc/config/riscv/riscv-vsetvl.cc
> @@ -1048,12 +1048,10 @@ vector_insn_info::operator>= (const
> vector_insn_info &other) const
> }
> }
>
> - if (demand_p (DEMAND_TAIL_POLICY) && !other.demand_p
> (DEMAND_TAIL_POLICY)
> - && get_ta () != other.get_ta ())
> + if (!demand_p (DEMAND_TAIL_POLICY) && other.demand_p
> (DEMAND_TAIL_POLICY))
> return false;
>
> - if (demand_p (DEMAND_MASK_POLICY) && !other.demand_p
> (DEMAND_MASK_POLICY)
> - && get_ma () != other.get_ma ())
> + if (!demand_p (DEMAND_MASK_POLICY) && other.demand_p
> (DEMAND_MASK_POLICY))
> return false;
>
> return true;
> --
> 2.36.3
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-01-26 19:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-03 7:30 [PATCH] RISC-V: Fix bugs of available condition juzhe.zhong
2023-01-26 19:13 ` Kito Cheng
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).