From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2093) id 172303858410; Thu, 26 Jan 2023 19:12:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 172303858410 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674760341; bh=Itp1U88AFsIdsGCCbOk6nnUarZOplp5v/kONbVSNs5w=; h=From:To:Subject:Date:From; b=B6eYTSzIT2VgvJBBre4jlwMJ8r58pNOcm8JhfcM6zyAgtZr3NA3yOa34yuWs5nwu2 QdB0uXlJVQQMUR/1MlQurVCqFVdvgGy9SDgs7YlyoxLx8HAzqBNnI7Ub6z8Ow6Ewt8 NmGbM8O5wTOw1Tqu4dHCxNfAlauXrzqErSmAeJeE= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Kito Cheng To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-5408] RISC-V: Fix bugs of available condition. X-Act-Checkin: gcc X-Git-Author: Ju-Zhe Zhong X-Git-Refname: refs/heads/master X-Git-Oldrev: aef20243b842284587023306e922e483b2401f34 X-Git-Newrev: cca9c44eca42d71ef20fc00a261616ba66edd089 Message-Id: <20230126191221.172303858410@sourceware.org> Date: Thu, 26 Jan 2023 19:12:21 +0000 (GMT) List-Id: https://gcc.gnu.org/g:cca9c44eca42d71ef20fc00a261616ba66edd089 commit r13-5408-gcca9c44eca42d71ef20fc00a261616ba66edd089 Author: Ju-Zhe Zhong 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;