public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Kito Cheng <kito@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-5408] RISC-V: Fix bugs of available condition.
Date: Thu, 26 Jan 2023 19:12:21 +0000 (GMT)	[thread overview]
Message-ID: <20230126191221.172303858410@sourceware.org> (raw)

https://gcc.gnu.org/g:cca9c44eca42d71ef20fc00a261616ba66edd089

commit r13-5408-gcca9c44eca42d71ef20fc00a261616ba66edd089
Author: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
Date:   Tue Jan 3 15:30:30 2023 +0800

    RISC-V: Fix bugs of available condition.
    
    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.

Diff:
---
 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 f6f24f73813..7e292f0dbdd 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;

                 reply	other threads:[~2023-01-26 19:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230126191221.172303858410@sourceware.org \
    --to=kito@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).