From patchwork Wed May 31 13:13:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 70382 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E65013857007 for ; Wed, 31 May 2023 13:14:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E65013857007 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685538878; bh=YIxAmXMafAUCEB18BtPslAuDx244usHABcWZyMHJ5LA=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=JZJNc/cXFk686REvlaSuE5tISyGJzvn1eZHRIcxdu+y1K9xbZ9WgznnFt+gbaaHPo GOev8pbLGXSxRCeCmzYaUlSv2W0MAp7tRD9W+2bm1eG/6zGO7vwHL+F6bEeTkzSazW HqjVkzSj3tKgJWLPaoiSrQ4yanJsRDHtZTX2uyR4= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) by sourceware.org (Postfix) with ESMTPS id 8927F3858D20 for ; Wed, 31 May 2023 13:14:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8927F3858D20 Received: by mail-ot1-x32d.google.com with SMTP id 46e09a7af769-6af74ca9f4aso5361444a34.3 for ; Wed, 31 May 2023 06:14:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685538847; x=1688130847; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YIxAmXMafAUCEB18BtPslAuDx244usHABcWZyMHJ5LA=; b=XZYLM5FEQWOWq9jYswE/4lwWFt/dyAf/Z2zEl5c6U6EO0/F5+C/pkfKLtxkzGbK4Yp Yr8RxHChnyqy+ZFyjyWAMSXvwXq6pxn972rNYWOHBUu/yATfcWmeBkXMPtwh0N4wrO+1 eHcwgqStdGUkCoNDNMsGMTZHP8zRrhEFTwrENSMoUpU5jx8e3vfe51ssnx/QIMxPH/q3 8k8JSglnxRFCoDNrM9IOiljwGmYCJXY33yXse2lPeUtHDQBv8M+zunljFr6g+YYXYMRT yFuOSn39tYqj/GgSNqNM3C1jl/NXNP5ezXg4G8PeXZhzCwWLeU7GirXqQKGIAmw85V7l kezQ== X-Gm-Message-State: AC+VfDzBL94oxsmbsAwCUMrDUupOepj3644rfy/oGI7oCS0th/AyGjXz +8u1cnQhVC6ViATYZFdqJTghDKCi/sttNxFq7Cwg6usF X-Google-Smtp-Source: ACHHUZ5wpparUb9pxGdbWgzwswGo95ldD5cQ5UeiCGeMiAkt+D71sbf7JZP9kbOQLJk0eU0forb64A== X-Received: by 2002:a05:6830:480d:b0:6b0:c9c2:51a0 with SMTP id dg13-20020a056830480d00b006b0c9c251a0mr2248975otb.16.1685538847517; Wed, 31 May 2023 06:14:07 -0700 (PDT) Received: from localhost.localdomain ([139.178.84.207]) by smtp.gmail.com with ESMTPSA id e10-20020a9d6e0a000000b006ad3ed04973sm456100otr.8.2023.05.31.06.14.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 May 2023 06:14:06 -0700 (PDT) To: gcc-patches@gcc.gnu.org, Kyrylo.Tkachov@arm.com, richard.sandiford@arm.com Cc: Christophe Lyon Subject: [PATCH v2] aarch64: Add pattern for bswap + rotate [PR 110039] Date: Wed, 31 May 2023 13:13:48 +0000 Message-Id: <20230531131348.1392914-1-christophe.lyon@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: , X-Patchwork-Original-From: Christophe Lyon via Gcc-patches From: Christophe Lyon Reply-To: Christophe Lyon Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" After commit g:d8545fb2c71683f407bfd96706103297d4d6e27b, we missed a pattern to match the new GIMPLE form. With this patch, gcc.target/aarch64/rev16_2.c passes again. 2023-05-31 Christophe Lyon PR target/110039 gcc/ * config/aarch64/aarch64.md (aarch64_rev16si2_alt3): New pattern. --- gcc/config/aarch64/aarch64.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index 8b8951d7b14..9af7024da43 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -6267,6 +6267,16 @@ [(set_attr "type" "rev")] ) +;; Similar pattern to match (rotate (bswap) 16) +(define_insn "aarch64_rev16si2_alt3" + [(set (match_operand:SI 0 "register_operand" "=r") + (rotate:SI (bswap:SI (match_operand:SI 1 "register_operand" "r")) + (const_int 16)))] + "" + "rev16\\t%w0, %w1" + [(set_attr "type" "rev")] +) + ;; zero_extend version of above (define_insn "*bswapsi2_uxtw" [(set (match_operand:DI 0 "register_operand" "=r")