From patchwork Wed Nov 10 11:54:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamar Christina X-Patchwork-Id: 47390 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 BCCE73857C51 for ; Wed, 10 Nov 2021 11:56:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BCCE73857C51 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1636545377; bh=gCpjl5kPtBIV7oOhww34STSnE+6726GJo6ifMzfrPOg=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=t/KtMDDASRpxhQVxgdk/spUuaoa1n86gPs7JoevZCvP2I7XwiHNfEtPuK6BnKgVuD uIVn5lrc+cj/AqiK+t/2jwuXuPeUDKDzQiQckzwbaJ8oL2PKWLglQ1gTVvRGiCO3/Z qUqJlp2YeRpI1K87gxQSfp2/GX3aehgNmokxKUKQ= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00050.outbound.protection.outlook.com [40.107.0.50]) by sourceware.org (Postfix) with ESMTPS id B8D0F385801B for ; Wed, 10 Nov 2021 11:55:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B8D0F385801B Received: from DB7PR03CA0102.eurprd03.prod.outlook.com (2603:10a6:10:72::43) by PAXPR08MB6654.eurprd08.prod.outlook.com (2603:10a6:102:15e::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.13; Wed, 10 Nov 2021 11:55:10 +0000 Received: from DB5EUR03FT017.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:72:cafe::d) by DB7PR03CA0102.outlook.office365.com (2603:10a6:10:72::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.15 via Frontend Transport; Wed, 10 Nov 2021 11:55:07 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;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 DB5EUR03FT017.mail.protection.outlook.com (10.152.20.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.15 via Frontend Transport; Wed, 10 Nov 2021 11:55:07 +0000 Received: ("Tessian outbound 4ce13939bd4a:v108"); Wed, 10 Nov 2021 11:55:07 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 2b032e17a97c9ea5 X-CR-MTA-TID: 64aa7808 Received: from b596c6823629.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id D074D369-7BBD-403D-A584-4F977CD5D4DD.1; Wed, 10 Nov 2021 11:55:00 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id b596c6823629.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 10 Nov 2021 11:55:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GaT5yw35yem7dqkxongBH7g51fkwZ6yN0b5jnn0872/3hTB44U/pyfKc3+Vf2468t4PRW1EgjxTumlNkZjgWSF2ba+2FyBvpSdrFM7eLtMrDJLXntKmACPCTiotUgnbjj9SEaeDgg5qmMMY769GPBwEPrVnkkdXiapTXhC8ru0U44qT708V7Tsntebt7OjHf2rwUPe55N4WBO91kCIhK8cxdnu/sCX2jQQrN5jB/ewOhBSQXdY15r+Qfy1yDI8/3IdkLVHMKhDcEShvHcRdy6dtDGBe9ialzgqY0j+0NM8Lu41sqfUnv6X20bTsVaJjNsWKu16Nd/Rz5o9HeYtXOKQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gCpjl5kPtBIV7oOhww34STSnE+6726GJo6ifMzfrPOg=; b=biY1vH9j5pEkEQ5aN2O033k85F4KWkVEYfzDOenSPvkW0Gfmt5qrC/UqPrPoViUdkKYPCPAk6hhO3MPwBESW1BX7FHcV97dYZ2IwWUiILbkulikJcht8176bLEQZoyPg1ieoc0z9e3EYEI/Q5QJbZxZutoanEWGFU7oiZf7zOta4zvUl8eA86PP4NXj+sg9cqCpiYsrLe+lJNl2PW+/ZXsCPBK8RsnrGoaa9Fpk6ovi4DjxTbIClSM693nN9VBDwzv5j0hu+81uzvtTMKGy9JALOYC+dDG+IUYnx8UgST5gYuCGV8PYuJARx731isSbCUBwlNu5uSvRNSIPuU2UiXw== 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: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) by VI1PR08MB4111.eurprd08.prod.outlook.com (2603:10a6:803:ed::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.16; Wed, 10 Nov 2021 11:54:59 +0000 Received: from VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::31cf:ea55:2234:c50b]) by VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::31cf:ea55:2234:c50b%8]) with mapi id 15.20.4690.016; Wed, 10 Nov 2021 11:54:59 +0000 Date: Wed, 10 Nov 2021 11:54:57 +0000 To: gcc-patches@gcc.gnu.org Subject: [PATCH][committed]middle-end: Fix signbit tests when ran on ISA with support for masks. Message-ID: Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-ClientProxiedBy: LO2P123CA0012.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:a6::24) To VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) MIME-Version: 1.0 Received: from arm.com (217.140.106.55) by LO2P123CA0012.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:a6::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.15 via Frontend Transport; Wed, 10 Nov 2021 11:54:58 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5cd64f90-c23f-42cd-433d-08d9a440f0a3 X-MS-TrafficTypeDiagnostic: VI1PR08MB4111:|PAXPR08MB6654: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:240;OLM:240; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: +AE2GdmlcGlznnFePaAbFWRMG1mANPsVcK0Uj8gRHt/cd30+LfyyJbTUMjDSOm7hamb52b8BV7znKp3E1+Lj74icHNA+a3wN8mFDguSotOi2Je3CQ3owQy4SDRg3gOSQOAOwcRnoD5s3DdokBZxz4yyOsKBteECVfazQgNQ+1VVPxLq31SXusrxON/n0Py2zLwxF+1vomhMa0za/yOVZ/Ta41wUjsNXbLWJa3XnQ1hBK4m6Z5D0a75CEAlUv+2MpxC2ShKj29OtCU5W5AbK3tncSoi1hp/EFDZfalPKgQMSr6z/mbgH7qJ5JnNtxbgrNvnIFIDx6E6JNOi8dOVIH2WTQOFhRpkAomOljbT63PzThROprtPgmIBoimlaCcCNfAOBDFKmLPTVZZfzOAPlfKu7RWVpMEzZWBHWiKiTDDF7qKIEzrVOPveC0HGyyUiNKYM+2TL+sdVSu9cpctYKCaIMGCvNEiZmXTapbkFmwyHDgUBGEusppB3ZHSrO76XyUgT4piILPZc7XY71f9NOdiYqep/5F2N7u4oXNa/UCyC8QQ47VcIDw8Ji0kyrYVdnnZ/dFG9N2WtRP8YtQfgieKoN8mi8WF1I7Kwzly9el0Yxts21hbyxmj+cmbkNkEDbScZnphCKPm7LVonOnndrU28wTtEBKW1r8ikH6oqs0NiidAAzHJ4lVTQiZfqqfRheP2VZbzJe6LQioiEjO76TfuOPXKcAb9y+mpz0LLAbdiZKrGomBsRIxdvF/wultd/tvv/dXDwM2Leicj9BlqrkFbNKTHF60IvEbk5MRJ9bltB7r6Ref4up7lyF6mlbwRsda3LML35NpMPlI8Kkniow3HA7tWovN9YY61VPtw8GkGuANVhWnxq1gqO2Aqwwzqp+y 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)(36756003)(2616005)(956004)(86362001)(44832011)(83380400001)(66946007)(66556008)(38100700002)(33964004)(7696005)(44144004)(52116002)(38350700002)(66476007)(508600001)(186003)(8936002)(26005)(8676002)(5660300002)(55016002)(8886007)(4326008)(2906002)(6916009)(235185007)(316002)(4216001)(2700100001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB4111 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT017.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 7f6e63c1-fe56-4ec4-06de-08d9a440ebcf X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +o8b7/qrNfGicpfQPV58cSRImCpDxkK8DWmgteJCezBngAV4HLy8k8zbH3OeVQ8cwv6jcPWFmYfhlpPsWAoKpHf2J0o7vgYvhBeceudHX1EhxFAC5R/k5ncMUmE0iZwXRMH0WE7iKSVw/xOBhAyGirE9u1r0LNy6fM1xGyD6y0bkouRYog0qyoEoMybSzMiPQepdHVZ8/K2P+uIuyacBbFHBmIQz7ghFEPyOV6/Ql1c8E+oFmh+QpVgGSN8WTELDk0s0Kiz0/9M/6oy5d894jQAcy5TCeRZdXSEBJncYAnYGTOkdE8QFW+r4bchaZrzUDjXgw/kviUvctgUXSCNd+sSwaKKuFlbFn9sGg+AwSMNQwjh9yha1yqTuKsMbNFbXzWClNNeF2wOvbRB2JZB8JitRwEwnOuf3q02EnTfTXHWrkV4UlJqHxK1dNoM4TR4q8olbT2iOeiwAL3LvNDFW5gxPHGE1ZN4y3l1TP+As3XKq74+tjFRgiZWjmmGboHjUoRPyNHsMbf9Dpu7VADXJGcku+GuyknNAoalDwI9erwJIwRVYWcAdP891sE3qey4xaoXWYy0HkX5hPODGExjC4Dfr7tb2qcqC7Bs4WS6fBrzBX0Q7FM8xKT8RBysjtUwFAHvQhY/rqMWUZ/bB+M2Zjii/KcUP9AMCU4i79kHVtNX5xqYRiwdKJpcR7mKENLJCeHmaKfhZekV6021PZwgTL1e2+YdfePNS/cJi8Fe8feDf6H3mK/oDiF0eXG7btPbrciK9b3VTVF2aySPP+1fGgtZaRDx7IJB1YfudnFKCMYVILxWUtY2WP1A1H8RRbhX9ObXu8KEdwwZk0IvmiF4oWEq6HYhMtpvGQKYrWVs+C3sYF9W+trQ/vPiwWUHlee01 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)(5660300002)(235185007)(4326008)(956004)(186003)(107886003)(47076005)(8936002)(81166007)(26005)(2906002)(82310400003)(33964004)(36756003)(44144004)(6916009)(508600001)(7696005)(86362001)(55016002)(44832011)(336012)(83380400001)(36860700001)(8676002)(316002)(70206006)(356005)(2616005)(8886007)(70586007)(4216001)(2700100001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 11:55:07.1659 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5cd64f90-c23f-42cd-433d-08d9a440f0a3 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: DB5EUR03FT017.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB6654 X-Spam-Status: No, score=-13.6 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.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: , 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+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Hi All, These test don't work on vector ISAs where the truth type don't match the vector mode of the operation. However I still want the tests to run on these architectures but just turn off the ISA modes that enable masks. This thus turns off SVE is it's on and turns off AVX512 if it's on. Regtested on aarch64-none-linux-gnu with SVE on, and x86_64-pc-linux-gnu with AVX512 on and no issues. Committed under the obvious rule. Thanks, Tamar gcc/testsuite/ChangeLog: * gcc.dg/signbit-2.c: Turn of masks. * gcc.dg/signbit-5.c: Likewise. --- inline copy of patch -- diff --git a/gcc/testsuite/gcc.dg/signbit-2.c b/gcc/testsuite/gcc.dg/signbit-2.c index fc0157cbc5c7996b481f2998bc30176c96a669bb..d8501e9b7a2d82b511ad0b3a44c0121d635972c0 100644 diff --git a/gcc/testsuite/gcc.dg/signbit-2.c b/gcc/testsuite/gcc.dg/signbit-2.c index fc0157cbc5c7996b481f2998bc30176c96a669bb..d8501e9b7a2d82b511ad0b3a44c0121d635972c0 100644 --- a/gcc/testsuite/gcc.dg/signbit-2.c +++ b/gcc/testsuite/gcc.dg/signbit-2.c @@ -1,6 +1,10 @@ /* { dg-do assemble } */ /* { dg-options "-O3 --save-temps -fdump-tree-optimized" } */ +/* This test does not work when the truth type does not match vector type. */ +/* { dg-additional-options "-mno-avx512f" { target { i?86-*-* x86_64-*-* } } } */ +/* { dg-additional-options "-march=armv8-a" { target aarch64_sve } } */ + #include void fun1(int32_t *x, int n) @@ -15,5 +19,5 @@ void fun2(int32_t *x, int n) x[i] = (-x[i]) >> 30; } -/* { dg-final { scan-tree-dump-times {\s+>\s+\{ 0, 0, 0, 0 \}} 1 optimized } } */ +/* { dg-final { scan-tree-dump {\s+>\s+\{ 0, 0, 0(, 0)+ \}} optimized } } */ /* { dg-final { scan-tree-dump-not {\s+>>\s+31} optimized } } */ diff --git a/gcc/testsuite/gcc.dg/signbit-5.c b/gcc/testsuite/gcc.dg/signbit-5.c index 22a92704773e3282759524b74d35196a477d43dd..2b119cdfda7d2888f914633c809b0aa7da5244b7 100644 --- a/gcc/testsuite/gcc.dg/signbit-5.c +++ b/gcc/testsuite/gcc.dg/signbit-5.c @@ -1,6 +1,11 @@ /* { dg-do run } */ /* { dg-options "-O3" } */ +/* This test does not work when the truth type does not match vector type. */ +/* { dg-additional-options "-mno-avx512f" { target { i?86-*-* x86_64-*-* } } } */ +/* { dg-additional-options "-march=armv8-a" { target aarch64_sve } } */ + + #include #include #include