From patchwork Sun May 16 14:25:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joern Rennecke X-Patchwork-Id: 1479080 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=embecosm.com header.i=@embecosm.com header.a=rsa-sha256 header.s=google header.b=DANWPoPu; dkim-atps=neutral Received: from sourceware.org (ip-8-43-85-97.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 ozlabs.org (Postfix) with ESMTPS id 4Fjl0t0WJVz9sVt for ; Mon, 17 May 2021 00:25:32 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7FB0B385803B; Sun, 16 May 2021 14:25:28 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-vs1-xe2d.google.com (mail-vs1-xe2d.google.com [IPv6:2607:f8b0:4864:20::e2d]) by sourceware.org (Postfix) with ESMTPS id 50A043858031 for ; Sun, 16 May 2021 14:25:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 50A043858031 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=joern.rennecke@embecosm.com Received: by mail-vs1-xe2d.google.com with SMTP id j13so1880074vsf.2 for ; Sun, 16 May 2021 07:25:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=mime-version:from:date:message-id:subject:to; bh=6cq1TMJH1vyzOER7sO4dStFgH+Hk+ghgpL/KN2+8+Ws=; b=DANWPoPuXjrT/wtXFlaElNKFJ+5HntJTGa54uQQIHv51afdCqbYuGkYA/KftO7Xs22 32yWzjI9eSmb9r0J8M7DdS4xDm7V04UiYVUi5knQuDV26DOlX1POiYqQTuxEdu8M+ufa es/dJ5Go4V4FP00vuXuvThPWyhd3xp4YnFky9y1/Lxf04aGtPESs6p0ERZEb5FpGkMo+ zbjPlen/Upy9L7vkDdAmGOvMNvJufgpdrotWUu3xcNH+UYUl7RpaJ3ivgvRIgSI68tK8 1WXB4njt5W9H87liZ/MppbZdqMtLTLAasU8lmfnmXSx0sjsaklDHV0fx4yn7NEdxGCE/ rbsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=6cq1TMJH1vyzOER7sO4dStFgH+Hk+ghgpL/KN2+8+Ws=; b=I15cbwaxu3JEMfOr3sTGkIK0vO42FNYa8BAPV7FmTiykYvjrsp+W3cAu32fyZjyA0E BUskVBhbYy5sMMOOb0VT6LfEwCu1sHlGBENTKTS9ZRTh4vi54jAIBTcFJn6QulyMAMBp 4Br9fR9eMSjS0xncZvR4eBjBHzLpqJC1hSo+ERuRl8vQqynQSjwv3l5GFY68x+fUUexE B1JZccLF8RleBRhV5DOpfQ9OwA0MB02JYR0dUlgE+zA2RhYMnbuf+fl3SDfaCz+Nwohj GMf53it46OPLP15y+MEMJRwmQhz5rPDGVPVSvFeGgFDguCRGxkti7kN0UF/53+HyK/5v AaEw== X-Gm-Message-State: AOAM5330gcxYXXIUuzcegu2LaUr8mA1ZZ0pj6sczUKnJ4/3jDFo0zJLx LwfyvuZ0gjzGw0HlyWhOxxNkFhYDCeuDH41RReQtVv4XmEvLTH/W X-Google-Smtp-Source: ABdhPJwEsudaKSePdHY38Yct4Z8t7ueR3L4LPX11SPhngVpYVh33lAVDuIQVcYCjU4vEiLS9ojwF24jjSZxPPml0qHU= X-Received: by 2002:a67:c897:: with SMTP id v23mr47834156vsk.21.1621175125919; Sun, 16 May 2021 07:25:25 -0700 (PDT) MIME-Version: 1.0 From: Joern Rennecke Date: Sun, 16 May 2021 15:25:15 +0100 Message-ID: Subject: To: GCC Patches X-Spam-Status: No, score=-12.8 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.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: , Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" At the moment, for a match_dup in a define_cond_exec, you'd have to give the number in the resulting pattern(s) rather than in the substitute pattern. That's not only wrong, but can also be impossible when the pattern should apply to multiple patterns with different operand numbers. The attached patch fixes this. Bootstrapped on x86_64-pc-linux-gnu. 2020-12-12 Joern Rennecke Fix match_dup bug of define_cond_exec. * gensupport.c (alter_predicate_for_insn): Handle MATCH_DUP. diff --git a/gcc/gensupport.c b/gcc/gensupport.c index e1ca06dbc1e..92275358078 100644 --- a/gcc/gensupport.c +++ b/gcc/gensupport.c @@ -1230,6 +1230,7 @@ alter_predicate_for_insn (rtx pattern, int alt, int max_op, case MATCH_OPERATOR: case MATCH_SCRATCH: case MATCH_PARALLEL: + case MATCH_DUP: XINT (pattern, 0) += max_op; break;