From patchwork Wed May 5 17:37:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamar Christina X-Patchwork-Id: 1474479 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=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=fOaOcxDf; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (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 4Fb3nr2Ytmz9sCD for ; Thu, 6 May 2021 03:37:51 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DE733386184A; Wed, 5 May 2021 17:37:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DE733386184A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1620236268; bh=GvwosJ1gpOWYMoncYluHyUbB3veN1SXWzs2AVyfTMDQ=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=fOaOcxDfmJ6UeAS9kn8AmRj+oXJ6gVguWgNzIGF+KRL2zradL35+C09gLD30mZKXk liOQJdx0JASbSza4K7Fx4dW+obX9wL4zdfofIqZ0xxOmBtMFDR+CQNPMlvsjy1LgKU wZr1ZhECCaYCySLUGUH6daM2lLzS4cm/A36Ovcn8= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60063.outbound.protection.outlook.com [40.107.6.63]) by sourceware.org (Postfix) with ESMTPS id 39241385040D for ; Wed, 5 May 2021 17:37:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 39241385040D Received: from DU2PR04CA0269.eurprd04.prod.outlook.com (2603:10a6:10:28e::34) by AM9PR08MB6983.eurprd08.prod.outlook.com (2603:10a6:20b:416::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25; Wed, 5 May 2021 17:37:43 +0000 Received: from DB5EUR03FT039.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:28e:cafe::69) by DU2PR04CA0269.outlook.office365.com (2603:10a6:10:28e::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.24 via Frontend Transport; Wed, 5 May 2021 17:37:43 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; gcc.gnu.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;gcc.gnu.org; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT039.mail.protection.outlook.com (10.152.21.120) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Wed, 5 May 2021 17:37:43 +0000 Received: ("Tessian outbound 13cdc29c30b8:v91"); Wed, 05 May 2021 17:37:43 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 55152ff14ef557b9 X-CR-MTA-TID: 64aa7808 Received: from 395419a2ae05.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E4C0CE62-3D75-442D-8A98-F0886838CA0E.1; Wed, 05 May 2021 17:37:36 +0000 Received: from EUR02-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 395419a2ae05.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 05 May 2021 17:37:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AYRqfyMmvhY8cYAkemtA1BZY746GohfFNds/ie9W+F9bYgK6FWmobEVwh6ExyzlzWLukIHhBCY7M1Pf23b9TAy6c5pijykTEcuMmnxnIt+/fC719mVHgehVJBYVomTFlU+/pkD4CVOzbElkVo77tYNxRVwbAt/SnJ/+selly2T96wXeHSC/pdq37W1EdFNy7qKh+f5zKGhL3xK0r/tOp1OsIv0XeYXPXtkVjbT+g3ZTYXGhziJmtf7ci8SKgUy1apLiG3mXEgiZUYNbLs+tQoC/Uw3upRp6g0glECy95GKRfc9/2LzqkhHMb/X7YS/smZKnx0icckbj/ExqU7DFgVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GvwosJ1gpOWYMoncYluHyUbB3veN1SXWzs2AVyfTMDQ=; b=WThdEJhNX6LImZItbMmchtI6/oBDHUSbdzlg9Mf0fyeAV0igePtUxVM4g66X+6Zajv2xT86oWE6TtXGFi+kPx4H3eW7bAPQabUg+qoQxcR2ZetzDmfcLVPk1YH11oqsCT4jk5uXGtyEo45LAavQBSeCiAWy9Of/8Vv4WP43RNX9HKhOD1nGc5NHi9FnXD3n7M1c0piep5FkdqsmJtdbc0CsNaHCy2MENa/d3UOfA+IyZt5EiGGUw7ds1/M35EqNVJIKHYWHPOFfAqgRzfGADPuld13cdPW8cVkh799Ju7yHpP7RvG+j/uQRvhuv9U8aWnL98shsL2Ei1ocZbLl7ObA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none Authentication-Results-Original: gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) by VI1PR0801MB1680.eurprd08.prod.outlook.com (2603:10a6:800:5a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25; Wed, 5 May 2021 17:37:28 +0000 Received: from VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::5828:531c:5ccb:5bae]) by VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::5828:531c:5ccb:5bae%3]) with mapi id 15.20.4087.044; Wed, 5 May 2021 17:37:28 +0000 Date: Wed, 5 May 2021 18:37:26 +0100 To: gcc-patches@gcc.gnu.org Subject: [PATCH] Vect: Remove restrictions on dotprod signedness Message-ID: Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [217.140.106.51] X-ClientProxiedBy: LO2P123CA0089.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:138::22) To VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from arm.com (217.140.106.51) by LO2P123CA0089.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:138::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Wed, 5 May 2021 17:37:27 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 872a9a0e-fe7f-4094-69ab-08d90fec7d1f X-MS-TrafficTypeDiagnostic: VI1PR0801MB1680:|AM9PR08MB6983: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:10000;OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: qXNhXea6jU2zWX+lm/tDokLK7ZYEFXQ0paJuHmjVjMLwDkEl/zZwc+chF0J34ZSPafQ/7lMBw3fM+fuXIbsu9bSK9QF4X6pJy14xmgmyrVMgATmiOjHmuEKRNrwQAF0cePeP+lXr9GPX4JDHezi3q0O2gc1tugGzE10KebbhsShxOPFNSwnA3JGPc00cX/lulfStSLLSJLifCJPkMW85gG38JUlXEk3sB2QaPmEo2Hoci2cP7CzFpKljKbwkxIs1SRaVWLwrRdyOcgv2DrqQp6za2aZXP0hqIYJUnZhyeCgFAg4z3mN3ln8zsi/8Sm/lOzc4LfYzR4TuNG22Kw1S0Bsy4XQpYytuui/NUosDQ3SyXl7aD+KphqvXWMUrtD5fypY9PyT58Rso4ZJw8KPnYqKL10M1Pa9vLmcUAbKFetIYQ9aSsBgTAAuryLHmQ0S1kBPJ/+Y1zjrt7UUIXWhALkQPmHLoZuTCwnsbdkVkSrQQzXUIfUbRDc0Q+Dx8VhYusmQcbSauDbLlV2+1Hj/9QUH7fH24BiClQpIqfEivK8Cq4wrbc5A8ZrZ3GY9hm/RdzCL8UQ6sx+qEja6H1RABa3xrwXIx74b5dtBhAJsbnqXUprWT0kKLXfCW4nT4Ba76qJR4NTp6NLl5MaJ/rO7jewfiQ8kBVbj4YeTeAdT9s7OfvH5SDT7xT1YWz+1kcYzyyZ/R1f4Va5N+kLO5ZiPGkA== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR08MB5325.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(55016002)(83380400001)(6916009)(186003)(8676002)(86362001)(36756003)(44832011)(2616005)(956004)(26005)(16526019)(5660300002)(235185007)(4743002)(66556008)(66476007)(66616009)(2906002)(44144004)(38350700002)(7696005)(33964004)(52116002)(4326008)(38100700002)(498600001)(66946007)(8886007)(8936002)(4216001)(2700100001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?q?2FWRI1Yc/mfGoyIovFW8j1myDcI/R/?= =?utf-8?q?n1sJfRvhgJ4iua2KwsbGbGinSSe4+dOorQZ3VTXYBAu/55ywZ6TT5Lbe78zrXXs7e?= =?utf-8?q?lY6/AwsOahxb074C4fGVb6tBLRXTqV73iU9UELSoB4Mp25nNqa6nsK00YHhzMYCNm?= =?utf-8?q?+eZY+q3QM81p9ngGhiTxtkzSQ34L0uUTgeGT95Zwjqyi6L51DZS8J59YhbOtLL+Bj?= =?utf-8?q?K4ML7OJGCSjFFKmNPukK9ZgmzNNQaOGaYBnH3e2cawhMUWn1qtWutIvYjNQykHtf9?= =?utf-8?q?tcWYJeHnhGIb1lsTvftm1/39pkAGcvqlHQ6gzas4Uq8TuPRwjG1z57K9DbcJChFeY?= =?utf-8?q?4HaEOMp9RioPdy18peqfrbMk1S8I1HVyegOWamYy23BKVEXqFcaOGmNOUOzNoZ4kT?= =?utf-8?q?SpD5b3cIkiphF4db2WA13x6+XkxRlJWKwWY3cMW/WsoJFrFLz9z8+5zzhce0t2bJg?= =?utf-8?q?ArfJkZu263P6NWMKShnWdp3McyAm8r4S6DVkX/s6GhPyTvEvgQ8ufW6uLZT/9dZLJ?= =?utf-8?q?bNUkGH3zfX0txdR9hLantg5WmEAu9Lys5q8pPhK/KRxL3mywrvxEmC3rSCS/ufgHU?= =?utf-8?q?f6D2eJdbCF4XQJ6f+rEvVCgV/kgKEryIHL0VUHVg+3pfawS3ZK3VLqujpL+zF1oO3?= =?utf-8?q?2eEh2bB03XfB/oS3DlAhqNE+PHC0AZS+1Yv4WVpXB86r+6sJe5dFLYINFU7bldsS5?= =?utf-8?q?RKkIR9BKahSQAMvqi3pS55hZkoazxaZmPEJG3JDsjLOV8wknvQwixIUBOSf2295vs?= =?utf-8?q?mwH27y7GIJnCohsy9/ET66dtH2e/UbtrmpicV0+p++xYIbldd3Y0Cm8G81CWKm+4x?= =?utf-8?q?dI5AaYZFV7b3eiUl/RWgw34a3/5wahaRjjKYx0pPsmIlJcT4407k7zkusCm4XfIV9?= =?utf-8?q?Yiw8MubbmW1Y372s7HbRsSE/b2TQYABv5IAuwis5Jwlj21R3QIyCjvu2r474U13hp?= =?utf-8?q?/akFFPKfYo/dtziMuXZ0FoxqENLJFmes646RjymZz1KktCDOPbNRobRGm1Z+5Ayta?= =?utf-8?q?o29mA2cpT/1QPvr1fAMiqVH9fUrnP5CQ4lf/ApvtFaAcGd74j8VQLwq6xX7W4gdcl?= =?utf-8?q?P7/4qBGG0u8lTYLf4JsaJ+ZamXYb0RvsVy7thHEf51zdccnL11CVZr4YnJzhKfOrY?= =?utf-8?q?JAXyE0s6xR8A88zg8C8ZTaHAnm0oXldYSwyf9BlkDwmWCxPVtECHaF9lOUAVKMw4e?= =?utf-8?q?OkLXtBg4VwUjEYqTdUfVsG1C84aCrxxbSR6dh6nF85gLjFPYlB8BDIahJi+UnudiN?= =?utf-8?q?Jwq1z4PVSafFcw?= X-MS-Exchange-Transport-Forked: True X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB1680 Original-Authentication-Results: gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT039.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: e64c567e-5946-4a3f-82ae-08d90fec73ea X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QKocl0+QQZe+U0njbx7FY/7xZk0cJZAJPrLPM1o/SuW1QtxgdpFFWVjBvj+uJn7sNbL59wOLwk/wXpp3H04F1yDAndcGhhlaab2icZYAeVfVmydsirTVI2FTggTiOg6BXhe/W1ckmVul4kb+qgIIcjz8JWhGnlJpBdPyWWAlvC/MZmUyuhRxE6RIbl5z4b4+leiFMRvMRUJD1tZBUdAVSh8SFWp3et3wMMlB9aSxDW6AI+xbZpSHYLxOFsHH0hDyIXmgxPhzhD4HgJntxXtFB9xXXDcYL1ICFtNYK8tLSdO6O4kVnaAqQt213ssUstNH03e8mEPeXdWo/ft6EU6FlMlXvruhWeVMCdOdLkVHERVRugzIAXdIm45/j0/yhPl8wEIn+zvHkl5+XPdZQpWNJvyQF45RUMmD2IZjF8N6uGu0RTN6kIaXrZs913SmfyuDUPUCEkFc6wesIWMi6BDxigdPFGc1+4Dn0JysVKxi/clnSQmKK+gZmwqbXOBqI/3DTp6tkrhuYUNH0lgowa+WUJXD1z0Fzm3bforuQuvuj+pYXtYBtnNVDgETEeQUkUjbuhY69JGrT0CmYMUloJvryCsoXZS1BsOMV5xCKAoEG32fbDpNecOez1rCEDgDHqwBS8KG9alR6EvEP+yuOvHF0hrmEaQJnRy7LQ/wxzEw2YRKjsQrPhMcGS1XEb5SzBkLRCdhDROmW4g/WnkQg6hIGA== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(107886003)(8886007)(6916009)(235185007)(4743002)(8936002)(5660300002)(8676002)(4326008)(36756003)(86362001)(44832011)(55016002)(2906002)(2616005)(186003)(16526019)(956004)(81166007)(70206006)(7696005)(44144004)(33964004)(66616009)(356005)(498600001)(26005)(83380400001)(82310400003)(47076005)(36860700001)(70586007)(336012)(4216001)(2700100001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2021 17:37:43.5465 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 872a9a0e-fe7f-4094-69ab-08d90fec7d1f X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB5EUR03FT039.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB6983 X-Spam-Status: No, score=-13.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_LOTSOFHASH, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY 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: , X-Patchwork-Original-From: Tamar Christina via Gcc-patches From: Tamar Christina Reply-To: Tamar Christina Cc: nd@arm.com, rguenther@suse.de Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Hi All, There's no reason that the sign of the operands of dot-product have to all be the same. The only restriction really is that the sign of the multiplicands are the same, however the sign between the multiplier and the accumulator need not be the same. The type of the overall operations should be determined by the sign of the multiplicand which is already being done by optabs-tree.c. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove sign check. gcc/testsuite/ChangeLog: * gcc.dg/vect/vect-reduc-dot-2.c: Expect to pass. * gcc.dg/vect/vect-reduc-dot-3.c: Likewise. * gcc.dg/vect/vect-reduc-dot-6.c: Likewise. * gcc.dg/vect/vect-reduc-dot-7.c: Likewise. --- inline copy of patch -- diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-2.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-2.c index 25757d2b6713b53a325979b96f89396dbf4675b8..2ebe98887a6072b9e674846af1df38cdc94258dd 100644 diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-2.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-2.c index 25757d2b6713b53a325979b96f89396dbf4675b8..2ebe98887a6072b9e674846af1df38cdc94258dd 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-2.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-2.c @@ -6,5 +6,5 @@ #include "vect-reduc-dot-1.c" -/* { dg-final { scan-tree-dump-not "vect_recog_dot_prod_pattern: detected" "vect" } } */ +/* { dg-final { scan-tree-dump "vect_recog_dot_prod_pattern: detected" "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-3.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-3.c index b1deb64e186da99ef42cb687d107445c0b800bd8..6a6679d522350ab4c19836f5537119122f0e654e 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-3.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-3.c @@ -6,5 +6,5 @@ #include "vect-reduc-dot-1.c" -/* { dg-final { scan-tree-dump-not "vect_recog_dot_prod_pattern: detected" "vect" } } */ +/* { dg-final { scan-tree-dump "vect_recog_dot_prod_pattern: detected" "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-6.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-6.c index b690c9f2eb18b34f4b147d779bb3da582e285399..0cd4b823643bd4fadd529b2fe4e1d664aa1159ad 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-6.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-6.c @@ -6,5 +6,5 @@ #include "vect-reduc-dot-1.c" -/* { dg-final { scan-tree-dump-not "vect_recog_dot_prod_pattern: detected" "vect" } } */ +/* { dg-final { scan-tree-dump "vect_recog_dot_prod_pattern: detected" "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-7.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-7.c index 29e442e8bbf7176cf861518dc171a83d82967764..eefee2e2ca27d749cd3af2238723aeae4e60a429 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-7.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-7.c @@ -6,5 +6,5 @@ #include "vect-reduc-dot-1.c" -/* { dg-final { scan-tree-dump-not "vect_recog_dot_prod_pattern: detected" "vect" } } */ +/* { dg-final { scan-tree-dump "vect_recog_dot_prod_pattern: detected" "vect" } } */ diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c index 803de3fc287371fa202610a55b17e2c8934672f3..441d6cd28c4eaded7abd756164890dbcffd2f3b8 100644 --- a/gcc/tree-vect-patterns.c +++ b/gcc/tree-vect-patterns.c @@ -946,7 +946,8 @@ vect_recog_dot_prod_pattern (vec_info *vinfo, In which - DX is double the size of X - DY is double the size of Y - - DX, DY, DPROD all have the same type + - DX, DY, DPROD all have the same type but the sign + between DX, DY and DPROD can differ. - sum is the same size of DPROD or bigger - sum has been recognized as a reduction variable. @@ -988,12 +989,6 @@ vect_recog_dot_prod_pattern (vec_info *vinfo, false, 2, unprom0, &half_type)) return NULL; - /* If there are two widening operations, make sure they agree on - the sign of the extension. */ - if (TYPE_PRECISION (unprom_mult.type) != TYPE_PRECISION (type) - && TYPE_SIGN (unprom_mult.type) != TYPE_SIGN (half_type)) - return NULL; - vect_pattern_detected ("vect_recog_dot_prod_pattern", last_stmt); tree half_vectype;