From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1314) id E4C393858438; Mon, 15 Aug 2022 23:14:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E4C393858438 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Andrew Pinski To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/pinskia/heads/riscvbit)] [RISCV] Fix a few constraints in bitmanip.md X-Act-Checkin: gcc X-Git-Author: Andrew Pinski X-Git-Refname: refs/users/pinskia/heads/riscvbit X-Git-Oldrev: 36b9f687fd51e20e170774d83f71ffbed6d92a7e X-Git-Newrev: d2d337f41f4512b6c1cbd2042f21721300eb1acb Message-Id: <20220815231434.E4C393858438@sourceware.org> Date: Mon, 15 Aug 2022 23:14:34 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Aug 2022 23:14:35 -0000 https://gcc.gnu.org/g:d2d337f41f4512b6c1cbd2042f21721300eb1acb commit d2d337f41f4512b6c1cbd2042f21721300eb1acb Author: Andrew Pinski Date: Mon Aug 15 22:58:09 2022 +0000 [RISCV] Fix a few constraints in bitmanip.md The constraints should be n instead of i. Also there needs to a check for out of bounds zero_extract for *bexti. gcc/ChangeLog: * config/riscv/bitmanip.md: Change-Id: I62e9f5834eae692558e3e8fee2b334e55f9bb9b1 Diff: --- gcc/config/riscv/bitmanip.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/config/riscv/bitmanip.md b/gcc/config/riscv/bitmanip.md index 6f5f18eda41..80c5ccbfcbf 100644 --- a/gcc/config/riscv/bitmanip.md +++ b/gcc/config/riscv/bitmanip.md @@ -44,7 +44,7 @@ (plus:DI (and:DI (ashift:DI (match_operand:DI 1 "register_operand" "r") (match_operand:QI 2 "imm123_operand" "Ds3")) - (match_operand 3 "immediate_operand" "")) + (match_operand 3 "immediate_operand" "n")) (match_operand:DI 4 "register_operand" "r")))] "TARGET_64BIT && TARGET_ZBA && (INTVAL (operands[3]) >> INTVAL (operands[2])) == 0xffffffff" @@ -110,7 +110,7 @@ [(set (match_operand:DI 0 "register_operand" "=r") (and:DI (ashift:DI (match_operand:DI 1 "register_operand" "r") (match_operand:QI 2 "immediate_operand" "I")) - (match_operand 3 "immediate_operand" "")))] + (match_operand 3 "immediate_operand" "n")))] "TARGET_64BIT && TARGET_ZBA && (INTVAL (operands[3]) >> INTVAL (operands[2])) == 0xffffffff" "slli.uw\t%0,%1,%2" @@ -354,6 +354,6 @@ (zero_extract:X (match_operand:X 1 "register_operand" "r") (const_int 1) (match_operand 2 "immediate_operand" "n")))] - "TARGET_ZBS" + "TARGET_ZBS && UINTVAL (operands[2]) < GET_MODE_BITSIZE (mode)" "bexti\t%0,%1,%2" [(set_attr "type" "bitmanip")])