From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by sourceware.org (Postfix) with ESMTPS id 8D58C3858D39 for ; Tue, 28 Feb 2023 05:00:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8D58C3858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-x1029.google.com with SMTP id u3-20020a17090a450300b00239db6d7d47so1315694pjg.4 for ; Mon, 27 Feb 2023 21:00:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=I8ZyVVtmi76lWT32gi8HpQy5eG1Jerem/qm7cQucuvo=; b=FfuIKU7j7pXMeAqcVulVKnbAo3Ggkt5fPhI+yYMtfjtrkCeQcYNqS2s6QEP1DQuHyh +K+u2JT5zOshrelIYF8j/uTwXuVGZllvwwYoC5h4pYSrejwdsyCO3HJQJViaIKaoy3Yp r+Ul0dcOaJ3w0pe9FUlUAnzrixpIW/tothCUix+YCeCWvd53bkF5gM8s948A7flNHeaY ndfQ2LJ7hdfzxSdqpLhAQkDJH1V/98Cmx46CC4UAcTKDflOS/ems4KyEVvtEkN0CzOeM epLdIVVRwMER28nBu51mnmh9ggzSvzpcvz5T8A4UO0819Bg5U+Fm6WKqtvipqB36ULJz /BPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=I8ZyVVtmi76lWT32gi8HpQy5eG1Jerem/qm7cQucuvo=; b=AeRTJ85txGS1zkojSGjuXWnYE/u+aH3twD1a3QYzWMNns/HlrTlQqLRqyR9jIKSV+1 ToHVepW/d8Mz8mKsj+eEiaGpxWzy9xi7k663vwd8jFdB+KbOmLoIOKKlJSAMaWiQ6mZb 840U2VZgLyM4PDewiK+MSGaIf86S8euoZJ7drZWnQLo8FQrb5FsdYt2MSjNdle4gfy6a wBrLNw/dk2NKBHjuu3D7BnW9SRKLsyMoTFU5Hb4B/I0jZpVQlJClfngzUNPCJJEjwpdA nIma+xQq08llTYcECGY9RjzidQq7u7/TksLTb2OlYaCFLjUrt93WkSxHCbZ8hqe4g5R3 vzEw== X-Gm-Message-State: AO0yUKVdjxtm1vy1I7jJOMSQ68qJVJz4k36TzKj2N/opebXt7onWwY6Z vxBy8HXkLcUEOE+ZxYM4PGe6GXUh0T5ueJOjyhj5mA== X-Google-Smtp-Source: AK7set/0D6WxBI0HbVACE6JPvRmiZ7nzZnvv26dDOn6OmIqvm82BLlL4Fc64bYJiK76zVTUWiPR26g== X-Received: by 2002:a17:90a:7b8b:b0:234:289d:5e69 with SMTP id z11-20020a17090a7b8b00b00234289d5e69mr1352817pjc.2.1677560444263; Mon, 27 Feb 2023 21:00:44 -0800 (PST) Received: from localhost.localdomain ([47.246.101.59]) by smtp.gmail.com with ESMTPSA id g2-20020a170902868200b0019a5aa7eab0sm5418821plo.54.2023.02.27.21.00.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 21:00:43 -0800 (PST) From: Lin Sinan To: gcc-patches@gcc.gnu.org Cc: philipp.tomsich@vrull.eu, kito.cheng@gmail.com, palmer@dabbelt.com, andrew@sifive.com, Lin Sinan Subject: [PATCH] RISC-V: Fix wrong partial subreg check for bsetidisi Date: Tue, 28 Feb 2023 13:00:36 +0800 Message-Id: <20230228050036.30601-1-mynameisxiaou@gmail.com> X-Mailer: git-send-email 2.36.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: From: Lin Sinan The partial subreg check should be for subreg operand(operand 1) instead of the immediate operand(operand 2). This change also fix pr68648.c in zbs. gcc/ChangeLog: * config/riscv/bitmanip.md: Fix wrong index in the check. --- gcc/config/riscv/bitmanip.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/riscv/bitmanip.md b/gcc/config/riscv/bitmanip.md index 14d18edbe62..58a86bd929f 100644 --- a/gcc/config/riscv/bitmanip.md +++ b/gcc/config/riscv/bitmanip.md @@ -442,7 +442,7 @@ (ior:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "r")) (match_operand 2 "single_bit_mask_operand" "i")))] "TARGET_ZBS && TARGET_64BIT - && !partial_subreg_p (operands[2])" + && !partial_subreg_p (operands[1])" "bseti\t%0,%1,%S2" [(set_attr "type" "bitmanip")]) -- 2.34.1