From patchwork Thu Oct 28 06:55:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kito Cheng X-Patchwork-Id: 1547352 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=sifive.com header.i=@sifive.com header.a=rsa-sha256 header.s=google header.b=OZ08Ptuc; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HfxD74Fk7z9sRN for ; Thu, 28 Oct 2021 17:56:07 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 59DA53857825 for ; Thu, 28 Oct 2021 06:56:05 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by sourceware.org (Postfix) with ESMTPS id 6F52F3857814 for ; Thu, 28 Oct 2021 06:55:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6F52F3857814 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sifive.com Received: by mail-pg1-x536.google.com with SMTP id r28so5546259pga.0 for ; Wed, 27 Oct 2021 23:55:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/mv9rFDWE3ouo3f2x692YaxMpwMxIRiKxcvaTSpM0W0=; b=OZ08PtucdpoTDN0GO6UYArpAESwjwgUx8DYAYCRpl7QOVn1wCRfHQx+Y8Cx1xoXbc0 Ay2SSYB6rNSKNeMpXg19incC7MfwGmTT5dwFgp8feDL20nXbxWFRoIufx7gMRiYVcCZs g1EVTlhc7hCCz/TNtRv2tiydLS/bIcd4JCeM63hjCAeFXcgtfBY3Zt/mSA6zy2d2neUc T338y8A7cm133N3CbolHjxDNw8DjYyfXJerVp/3hW6hfeOFLGrubgEBWelvMWKoW9+1Z p2OfrgYSnk0XVEbQX4pl//q51lEsxxqTFqYw5p/5mYgyEh2XXVi3KH/vkJz3R9t4747U A5sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/mv9rFDWE3ouo3f2x692YaxMpwMxIRiKxcvaTSpM0W0=; b=P6lTusvywC+rFugPZxqZs5XU1lmqSajACATXD7q55/GijUOMIcKutJhTWH33qx2FnA yzri+1j5Ill5CCu6Q/OIXkhUOuwBmK4egSkKGB7h9VV80U7vSP9NACCFkeztY1iXho0v AzLkXTP3EhyspS27c4lG7eM35z8Ky+WYT21RVyepjhE/oK+ip90YMuXoTL5N5s/ln76p RIGMDtSJKEZPbBDnpwpZahdG3PL75wvizcFv3fILh88G+CLaBhifpTAp61bw6J2Ygs7T qvFWWke6M998+STEugRIZrmjPSDWbpGAG09xxbmtxO9y+u9NQ0aN8EZ1dSKvdv4wCCfy 2Urw== X-Gm-Message-State: AOAM530et8RrmzDbU6ASjFgl53cRK9ag8w+SmetwVyM2LzM10cpFMmRT RX9jAnes/fUT8FAPTlN82U7WLSS2DQjGmg== X-Google-Smtp-Source: ABdhPJzuqn5H94w4P3LDys2Xa88LjXanktjZhzQ4qKqPhxgaAECxENwFoqzRd7wMJvcPwE8kGa5X7Q== X-Received: by 2002:a63:4c4c:: with SMTP id m12mr1852584pgl.171.1635404106840; Wed, 27 Oct 2021 23:55:06 -0700 (PDT) Received: from hsinchu02.internal.sifive.com (59-124-168-89.hinet-ip.hinet.net. [59.124.168.89]) by smtp.gmail.com with ESMTPSA id r14sm1614448pgn.91.2021.10.27.23.55.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Oct 2021 23:55:05 -0700 (PDT) From: Kito Cheng To: gcc-patches@gcc.gnu.org, kito.cheng@gmail.com, jimw@sifive.com Subject: [committed] RISC-V: Fix wrong predicator for zero_extendsidi2_internal pattern Date: Thu, 28 Oct 2021 14:55:01 +0800 Message-Id: <20211028065501.5373-1-kito.cheng@sifive.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-Spam-Status: No, score=-13.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kito Cheng Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" We're wrongly guard zero_extendsidi2_internal pattern both ZBA and ZBB, only ZBA provide zero_extendsidi2 instruction. gcc/ChangeLog * config/riscv/riscv.md (zero_extendsidi2_internal): Allow ZBB use this pattern. --- gcc/config/riscv/riscv.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/riscv/riscv.md b/gcc/config/riscv/riscv.md index dd4c24292f2..225e5b259c1 100644 --- a/gcc/config/riscv/riscv.md +++ b/gcc/config/riscv/riscv.md @@ -1311,7 +1311,7 @@ (define_insn_and_split "*zero_extendsidi2_internal" [(set (match_operand:DI 0 "register_operand" "=r,r") (zero_extend:DI (match_operand:SI 1 "nonimmediate_operand" " r,m")))] - "TARGET_64BIT && !(TARGET_ZBA || TARGET_ZBB)" + "TARGET_64BIT && !TARGET_ZBA" "@ # lwu\t%0,%1"