From patchwork Fri Jun 21 22:00:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Law X-Patchwork-Id: 1950994 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=lSz7GG7F; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.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 ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W5WWv1831z20Wb for ; Sat, 22 Jun 2024 08:00:58 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8DD6F3830B5B for ; Fri, 21 Jun 2024 22:00:56 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-yw1-x1133.google.com (mail-yw1-x1133.google.com [IPv6:2607:f8b0:4864:20::1133]) by sourceware.org (Postfix) with ESMTPS id 260E838313A7 for ; Fri, 21 Jun 2024 22:00:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 260E838313A7 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 260E838313A7 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1133 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719007241; cv=none; b=VAtZdrfKtrt3dSQpBeHqBxvqFZBrxraC+xmnl3+BHCg61eEap6kojPdVxTF+HgklktDBEM/ipwlyihKrRAjrx141JIptQGI2o6Wcs7bXkWGf61iW4P4JkK+8HjEC36M5hNQnE9E8eo/ynOtvzlQd/nGxG1OIojjc6Fe/BmqVVYE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719007241; c=relaxed/simple; bh=Ncd9FcXPHgPy8Z37t4Zvp06xL37Qw8cvOBs0HSWoD5U=; h=DKIM-Signature:Message-ID:Date:MIME-Version:From:To:Subject; b=t3wfAzxZXtwR7VKCd0l8JB+SpuvQC2nc93fvz/ZZmZ8IDdnl3Fl9wSVfjCPppliljzOARzSTn3EEwvXcKwpfyccZFaKafE0Gc1qFEIiTNLxB3dqHMCFPCm3K7Mt8xNDH+qadgFa1jr/G+Lpz1PyumeCArSJqkWe6WyjBPiWXh3s= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-yw1-x1133.google.com with SMTP id 00721157ae682-63bca8ce700so25057197b3.2 for ; Fri, 21 Jun 2024 15:00:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719007238; x=1719612038; darn=gcc.gnu.org; h=subject:to:from:content-language:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=sB9rorxcX0vjwhn3S+Mln/7n1osDlkYOMNwjs5dqaJc=; b=lSz7GG7FWpTl+hZsimxp7FRZULNBwxss/XFDdIoNiKhwqDAGUBT/SRnpQ6YmLPrAsP GE3O+/Ry32hVZUGx7vAAQ2M4pX2h9NcJblf24Nx76869WerDIPyM0iVl/6DYmMOEVUfl oLK66pW5BH9dn+hRfVBQ1W+JIiQgwemyJob2XYF/9/0UJL9648sYrH/M/KG8MJkgLh3c Gxsp0ZUf6XP9A4h/2wFpSwYMVM1pR+ctWYFblARzv892PXzxtLaXcYZtb2JyYe2O2zl8 WbXZ7hQK8z829ve8u02OAbVbs7zIbwroA1/O07mxbFE+iGYDtsvApReVRmcwVWpjgj2K W8gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719007238; x=1719612038; h=subject:to:from:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=sB9rorxcX0vjwhn3S+Mln/7n1osDlkYOMNwjs5dqaJc=; b=YIqrY4ndVc44N1s2QSFvs5E//YmkTU8QrtW/WKlFMxbjf0ULtfU06qHe8fIDzUyq+C QzXFeOyLF/+uNpKdN1aMvcA5FivdGLk4ih/cYGrlaQKWv61mWSP3o5WUSderV6gezs9w tkIZSwG0O23VOPLL2pN/NVCB8DyoWfS9RVmG2abN5+TZKyRkiDRf6EtY4w4VTWht2NpK 4hqJ+R/QSvtX2wzQ9izrUtfiylY8yhfYYojeJ8mmCfnfFny4zGoUZzFzqzSKv65wP6NU lo+G9vFdFnXr/a+Pl3UWo9zzbzFcmd4JgX8/wZqeu/rDsEW79sCG6m5ucyXGQkICaPtM w4dA== X-Gm-Message-State: AOJu0YzHjIf0LHc96F280sEDFcPurmL3SY5CS2uZXYWbqN5VH+DqqvJK wyRIgHj66KlcCaiS/dWBOhimaB2Wlc9sQMdtzc+churu9YrjC8iCtk4rVw== X-Google-Smtp-Source: AGHT+IHvKy24rfeUtd5pFQ5E6nrvKHigdkPcOqfP+4o6+XWE8Iq5vraJk/KIS6yODp/GyE0Pw3Ccww== X-Received: by 2002:a81:84ce:0:b0:627:24d0:5037 with SMTP id 00721157ae682-63a8ab6fedfmr97139297b3.0.1719007237795; Fri, 21 Jun 2024 15:00:37 -0700 (PDT) Received: from [172.31.0.109] ([136.36.72.243]) by smtp.gmail.com with ESMTPSA id 00721157ae682-63f154d601csm7313307b3.114.2024.06.21.15.00.36 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 21 Jun 2024 15:00:37 -0700 (PDT) Message-ID: Date: Fri, 21 Jun 2024 16:00:35 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Content-Language: en-US From: Jeff Law To: "gcc-patches@gcc.gnu.org" Subject: [committed] Fix testsuite fallout on stormy16 after IOR->PLUS change X-Spam-Status: No, score=-8.4 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org More minor fallout from the IOR->PLUS change a little while ago. This time on xstormy16. The pattern to swap nibbles actually tries to handle all the cases of IOR, XOR and PLUS. But when we generate PLUS earlier in the pipeline, the simplifications/canonicalizations are slightly different resulting in the pattern not matching. This patch adds an alternate pattern which matches what we get now. Basically it looks like QImode rotate by 4, zero extended to HI. Run in my tester to verify the regression was fixed. Pushing to the trunk. Jeff * config/stormy16/stormy16.md (swpn_zext): New pattern. diff --git a/gcc/config/stormy16/stormy16.md b/gcc/config/stormy16/stormy16.md index 7f12679847b..62318345cdc 100644 --- a/gcc/config/stormy16/stormy16.md +++ b/gcc/config/stormy16/stormy16.md @@ -1363,6 +1363,20 @@ (define_insn "*swpn_zext" "swpn %0 | and %0,#255" [(set_attr "length" "6")]) +;; Alternate form when we use PLUS instead of IOR early in the +;; expanders. +(define_insn "*swpn_zext" + [(set (match_operand:HI 0 "register_operand" "=r") + (zero_extend:HI + (subreg:QI + (any_or_plus:HI + (ashift:HI (match_operand:HI 1 "register_operand" "0") + (const_int 4)) + (lshiftrt:HI (match_dup 1) (const_int 4))) 0)))] + "" + "swpn %0 | and %0,#255" + [(set_attr "length" "6")]) + (define_insn "*swpn_sext" [(set (match_operand:HI 0 "register_operand" "=r") (sign_extend:HI