From patchwork Fri Nov 29 03:53:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejas Belagod X-Patchwork-Id: 102061 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 9AB393858CD9 for ; Fri, 29 Nov 2024 03:57:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9AB393858CD9 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=YvEz0rTR; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=YvEz0rTR X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on20616.outbound.protection.outlook.com [IPv6:2a01:111:f403:2613::616]) by sourceware.org (Postfix) with ESMTPS id 8D2473858D26 for ; Fri, 29 Nov 2024 03:54:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8D2473858D26 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8D2473858D26 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2613::616 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1732852467; cv=pass; b=b/lxrkUBlmynE4LOL052EN1RbYW89z3GCMdS8SIRwjjAaqLeN5DK8pHsUxT7VmytXyfG31DLbhxASeXJof58cIQOaOOhNcY40hKhEmmmKAnHIeExG874tYDFV2nuaZI9I9+0QtFG84BglwtA9e00f6QOTT3Um6Ae3qfwN36vSzY= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1732852467; c=relaxed/simple; bh=uu17jLRLzGquUSVMOZirpD4WUA/6mhJ/LIH11piBP/A=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=mBpyenauz8pwzHThplM+spiTv0pQm2E4dS7zteRJ+rfyYWQT05eOZuxoy1Cqfrx1Nyk4zCKrew0YzciFQrB3jqvzTiBjdh27We2GgopyFpBL+BvtyGJTNVOVCEwf2JV4tQWbrR4bJofq6yKGqj3yD+/iyYK6QE2kuynoTQjRlCs= ARC-Authentication-Results: i=3; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8D2473858D26 ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=s6Lp4fHe/nOaplPiSx8cVIQSyNSSNabpg0B941+Mm0Wv0tnrbTYPfKs/tTxIHECWq5VDaQYqaFFKNLhRSp4rgWqJHe9QNVvMR0jd0Bec3u+3n2EBrtQv0pIaApi/L7JLVQJslNuT5Ew5nw5JmxD6AEju2Rdy5XWspJgEZuGeadZvueSJaPuRFzfpNzM6Dh/2Nodmfy0zFHNrWWR8g9om4d7OXLnBesUSLiK7GZAYwOi43uapAXC4RApH9XKC3RWTwMG8j4mZuYBiA3Oa65YnMMBJv4kMOvhKcacRBlouNk1Le+4Qdyt+qlGEK/rB/RW/mjtpJlkrdO3OSVs4Pxu0zQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=eIcJqMORS1k88lt1GJVNx+6obik5iHh/fIngufKwmBc=; b=l4OJxZ3K7CcoyuOyML+/h00WvdGZm1w6nKs+h1u6MMqosN/v7pLRZ2MGJOcEZfMHFQEYH51HRggkyhxLEXiPl7h/54+Q9ckx7xaIXRTmmmmhOHnWSiVBIM+Hnfdu88UfBKJKtpWl+YR43rVXHaMWTb/CugyIYaL7Uikzy1K7X1cSCVrr/JrCHT7IXsA5ydFEL5Rg+xmgkVqithwCKzmENtGkpuYF7tXHyj0s/pnjS2QGt9sEoZ1r6EeGWJRPuNaTrJxSWQMRkor7TChimxlni4T+kqQnPAjEORj9dBot7RUutqRVp4NKArnNYgFMEZ0VkLeOs2ovBpqWcuiPlFg48w== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eIcJqMORS1k88lt1GJVNx+6obik5iHh/fIngufKwmBc=; b=YvEz0rTROAimU0GYcsOzkJTDJm2+IsUpPcQilhmBA4pnNlZIK/QjQJa8N/6Zau+87YkoddWvIYfe0jEGjIC1tRzAQdJYBNxE1oBefT4w9o5J3/blkk1629lUvVc+62V4IyOCkl8qukECAir8slvyQeg0dB7BjYOhqhwpv9tHEDw= Received: from AS9PR05CA0186.eurprd05.prod.outlook.com (2603:10a6:20b:495::35) by PA6PR08MB10566.eurprd08.prod.outlook.com (2603:10a6:102:3c9::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.15; Fri, 29 Nov 2024 03:54:22 +0000 Received: from AMS1EPF0000003F.eurprd04.prod.outlook.com (2603:10a6:20b:495:cafe::8b) by AS9PR05CA0186.outlook.office365.com (2603:10a6:20b:495::35) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8207.15 via Frontend Transport; Fri, 29 Nov 2024 03:54:21 +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=arm.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; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AMS1EPF0000003F.mail.protection.outlook.com (10.167.16.36) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8207.12 via Frontend Transport; Fri, 29 Nov 2024 03:54:21 +0000 Received: ("Tessian outbound 02553984e049:v514"); Fri, 29 Nov 2024 03:54:21 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 909eb2228a28e833 X-TessianGatewayMetadata: V+xlRMvUmdkSH2hFq8tHJNtPOVmIrrz5ME75lwIsyOuDRp3nsC247OPMNK+u3itl7C9q/dKpL1ny3Uhl/Hrc4F+7myY73+QAhzCqYAuIO8X8KtNFDqeVoxXYdkbuHV4sayX0W3xus3Afto07/LmeL27sBt4HYcHZspS26FxwxZc= X-CR-MTA-TID: 64aa7808 Received: from Ld3b0d0bdd913.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id CAF6D54B-89FB-4E3F-98C8-5E4C1A42759B.1; Fri, 29 Nov 2024 03:54:14 +0000 Received: from DU2PR03CU002.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id Ld3b0d0bdd913.1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Fri, 29 Nov 2024 03:54:14 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=o09pkDVSAMcT/WAl8c5vV4Wp99u9vCzCb5Tf684r0VUfa9uM0uVVd4QFKWiHoJxN1lnH23PnSVqprKCPlKoH06uERiU8wDxHxGcbefQMGIDhB/mxKTmbVBPjQ5TkH38ec4QfDlGUFfkJhWTayF2tx76Qrh4n219/4niR9PQvdjvLYptWkbZLFZNIubJ8rL4GJUPwamSN5W1Gasgj/ov2A2uTZesVaU3lIFLt5PfenDADaDZamWSofmxF2H0x8QYV+wPzMqUyd5BCLHgkd9HWnrfTs7iAjMXbkNMOC/WE6tIWE7LUmqfENRDaKCKbaVR4ZRb71iAUU5KmWFnTPYbEZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=eIcJqMORS1k88lt1GJVNx+6obik5iHh/fIngufKwmBc=; b=gAm+ywNqJnU2HgalpBMKWddWcgqZY6s1RO1EvNom6hcBabQBDSI0pjVo7NuxyD1rjUdWWYSScr9n9e33ttfhrhRzGo6NdIppujfMh9ji3P+EbkvV1UTwm7iN85aNTH/5vQJe2lqUQgESqzKmRL5bcvJuNlZSp2Oxe04aEiouF3lCfMsP0HpYIxXoGY5LuIi0BYfeG8zSdVqVMwjPJT+IQY0mogf9rdxayPXojhS8XgZjxjm9KM0Or6rZ41FpTzxsTnWJvUF+9Vb4gOiODVYuXkoI0jl0iG4si/+ZuqeG0qCl7nrTWCdW/2x63JcghjEHbPUzoWGPvzpG3LODcVKG1Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eIcJqMORS1k88lt1GJVNx+6obik5iHh/fIngufKwmBc=; b=YvEz0rTROAimU0GYcsOzkJTDJm2+IsUpPcQilhmBA4pnNlZIK/QjQJa8N/6Zau+87YkoddWvIYfe0jEGjIC1tRzAQdJYBNxE1oBefT4w9o5J3/blkk1629lUvVc+62V4IyOCkl8qukECAir8slvyQeg0dB7BjYOhqhwpv9tHEDw= Received: from DUZPR01CA0151.eurprd01.prod.exchangelabs.com (2603:10a6:10:4bd::13) by PA4PR08MB6141.eurprd08.prod.outlook.com (2603:10a6:102:f2::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.15; Fri, 29 Nov 2024 03:54:12 +0000 Received: from DB1PEPF00050A01.eurprd03.prod.outlook.com (2603:10a6:10:4bd:cafe::d) by DUZPR01CA0151.outlook.office365.com (2603:10a6:10:4bd::13) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8207.13 via Frontend Transport; Fri, 29 Nov 2024 03:54:12 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by DB1PEPF00050A01.mail.protection.outlook.com (10.167.242.43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8207.12 via Frontend Transport; Fri, 29 Nov 2024 03:54:11 +0000 Received: from AZ-NEU-EXJ01.Arm.com (10.240.25.132) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 29 Nov 2024 03:54:10 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EXJ01.Arm.com (10.240.25.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 29 Nov 2024 03:54:09 +0000 Received: from a078660.blr.arm.com (10.162.46.14) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Fri, 29 Nov 2024 03:54:08 +0000 From: Tejas Belagod To: CC: Tejas Belagod , , , , , Subject: [PATCH v3 1/8] aarch64: Fix ACLE macro __ARM_FEATURE_SVE_VECTOR_OPERATORS Date: Fri, 29 Nov 2024 09:23:57 +0530 Message-ID: <20241129035404.3363162-2-tejas.belagod@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241129035404.3363162-1-tejas.belagod@arm.com> References: <20241129035404.3363162-1-tejas.belagod@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DB1PEPF00050A01:EE_|PA4PR08MB6141:EE_|AMS1EPF0000003F:EE_|PA6PR08MB10566:EE_ X-MS-Office365-Filtering-Correlation-Id: faa866c2-f090-4dda-a1cc-08dd102981f4 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|36860700013|82310400026|1800799024|376014; X-Microsoft-Antispam-Message-Info-Original: wLEot36fZeKKsBuQzXwXLccd8yLfaGVmKUDiXYkja31YjjMmLDY2PvgodnZRMJR1oyNNQms/YeBnHk1c/LJIhsnfKjLiBxrSAsme3B9o/P4CeMk/gaHhyS0EQ7hhEymDsQ+ix1205Cwgic25Qm/4gexPZ03fiT5BvYwVEq/z/qOCehyZMIs/QtqFrUh2vTXAs7VjaRnBHdMdmaiiK6XGvE4/9bogr9IV2MUAjKYc/2d5Tt2ClheOL2drzd1xAHtu+ZD33NK8oeHD7FjeAXSs8fKDwAD0jo8AKuOi6qD7StNLDM++Htn+VFD/LnoDggCCXHIxFKw7m17QTrZpgULChi84EIaQ/wZvfLar9vP4y2YYtq5DRxBXoLzuILaLGWqQSeDaLJf3cxXCsq31u2o4H9I85Kzz+itIxzS7GpRA4AUz0Q4+OkOKU2Tma/YMSJtuFCEbLnK7upQk5+MhFd2T120CsT+4V52VY0edvRWYr4F78dpHQLIpE2PQsHhh9W/izQ4ZGjPThz5xlZz6B/4FvFgrDQyyIdjgtFpQk3hCBKfIp9hVhHQnblkR4slVkWEfE9M9bMaKyTHrWnTimkrlASOBj0CIlIOb/lwmptia5kg4V7t8SsTU773ADDnsm8SsXVHbW2hY8AwrX+jB8beFCIENpZ+20c0RIfRa2TduLY+FE1RUzsVeypsFgo/5cZOhUbNCUWMwsXDm+1Pi5PZaKgdtR8Pin+JnyL/1E+FiufGZ86qo67uUXokByTtqhBqKJ9c3ZFWvLPR2dErShX9CzoJt6nMjo9mP0yK51QxbfDHYSlzIQ7OA8lsQnler5tTDbOKfBteX/bj+PVXWxGQFv6WMqGd5AyhjGw+iQzSfc6DWopWfRh6EZ1CVszQt1bzR6/EY4L+4hee5pD0ZjuWmJSyKbqKRrv4poltsvt8TzhL5Qw/gmqXPCV39y1yQR8gCsOKRhtgYpuKX/kHHXiOjWApRFVmd0JxpQy6g8AqlsRr92AvL+rCRb/nTWQsCqyDCmRYzr8cu1YTCpJP32Ui8JSFu+s6qo7TzSQEVQ8ifEooycx7O9hE/Q7HWUdTYP2wnKNPD4GJNl8N0gSXZSn9fBwGl9pdwWYSMj8tqSFr7FVDPJFITEDPilP+V0HkxSvsyY7cujmIJb7LQ2Q71POnv6LBfzOtFARAWUvHHeSNpxZiyb5CRKPeC/UIWK1iIqdJeoSGElIxvqiyX4x8hXKNwXg3bp1TRRg2YaYUuoz0IdQDjtir5k1/agLXCak0KWs778S8dkfEhUnvz77cNjwnaV+Cjs3ardHG0TnbVlXC3Z2qCZGon4aD5xhP3HHYB4YHworNr12tYqFhIsSK2OU43WpKP0Ul7mg17V+umv6zY4Pr3IiLwjAcKz94z0dxhO+AY/cb7Ez1Ugd58IMAhIi1JuWL+tvj7f0hvqDh+7qtNSFfLE8m1FHv7GWJXaQOpJjr/ X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(36860700013)(82310400026)(1800799024)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB6141 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:10:4bd::13]; domain=DUZPR01CA0151.eurprd01.prod.exchangelabs.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AMS1EPF0000003F.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 2ae514cd-44fc-47b5-cecf-08dd10297bb0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|35042699022|82310400026|36860700013|14060799003|376014; X-Microsoft-Antispam-Message-Info: wC3Hj5YBgOgTFJoqMoHaiNBj6bxLcQmlDI+loSDivJewUkSv4AKj8csxb79cBqMlbsyOfeRpJKDCm90B9jjo3YC3VeO2aq1ncGUXwuvAezi0AKjQPu/lbtQp7tXxD+qq0P6QHWG8347k4Ht1q0SffxIXYwjqoQBYx8veogseRJV/dXAEfiiCQirPowzx1zb2WspXU4iF9q68I+43a/WT1wa/GxFWGP9DhbOb73Z2pUs3uZv6kZJBGCGAnhKFXg5hqd0krp0/tfgI97r1qgpiDZWnPME+INpt/9vQiKts9+b8ANwHLbE8IV2bdss9+RCtxokCLczfWEVOeH3BNQtzqlWrpJQcfWWEc1zOyrU+kiPcp4Y+oBQ7zpPCGuFMK2X9BQQIeL8GmOLdSubaaOQlUjpAwID5NsO0MLF1Dw5xENWXET7BEAOLRihCvNwOTQ+9lZbPvW1+qqM2tdacaCteE6M5fffp3xXcJpenTGo3KMnrNGkFkVAZoEox6uOXlhNaXq4kyd0i8lNmBJ4tye4DAer8ogNZbOLv+Tdw4LtXzSohQJoT15pzxuhCMIJlee5BcjhC//OEFJFV2Pv9kUT6h0AiV2qh1oMCXSJC3gpbSFFF+Mmpstoy7DpKpSEXYVb1VW58iHYuLRkw0TaqHUcKKU/o7PSRNdPpRfYk008+C97u3msVYu+RuMpecKtYKuWcuBg+2r0TkRa8XdfSw3MNumtG9YcMAHkcYkTpI9iVor1VxOJSDVkR5lEGpNBjDjjse1bQQLSWShrzw6acLU7B9Tu3mKgNRs9ak8eV6s1m89Oc17kVyl41RHbUtZ6Kj788XexlkSiFCY9xwfEknlT3lnVIbkLy+HQWtWmuV1CmwPfrh6RVeVj3fybcIY3Nx6iHuh+5pq60fSHD4nkQRN+HKAxeu4LzBhDE3D0LXDNNmgMFbVETENwkB5BIRhx8eFOAJWgsk/hZO+2tLTZIbYf54XTcdAkN0vizdY0rUXy533UqTL5BbKlGaS2VWHYLIUzVMrVGyhAXNSWf3ACVP7RbF9dPBZayXEtA2IuQN2nnw9W/9ZT5b3fiIBC92/0xLcPfvul6UVLnRpOKpI+KRvYlwA90ZeuTNqZPm3WiPHd0M934aObHCtbTL0vfWWk8o1Enr7LKWay5Ct+mg0b6YjIUAvyObiVFEkPFTBQuiJZ3zpJHVAj7yQh53lAotkCyrp2zyheHDc6qXtXZ2ptuxA2NQDs4Uxtir3HZhvnuVeU+x2lKAKwpqE/gbJJ0E5BteLQLQW1NVKroPDN9hwa6AndOsvhMaUtbHqn0WNo43dl8pnG97VDzqfhVC3lQ6AwCXC9/1IadAT8RjTH9H47En9hDTKtYgXFN774HpZo61xuJ4YMRrAirXlE7HSHizHXBQ/+5SIhsI4G8ODFQfuR8sR0nKC85vwQNH/8baaM7dUdgSN3NS73Qb8elsDgX0oe9Kk3f 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:64aa7808-outbound-1.mta.getcheckrecipient.com; CAT:NONE; SFS:(13230040)(1800799024)(35042699022)(82310400026)(36860700013)(14060799003)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Nov 2024 03:54:21.6006 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: faa866c2-f090-4dda-a1cc-08dd102981f4 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: AMS1EPF0000003F.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA6PR08MB10566 X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NONE, TXREP, UNPARSEABLE_RELAY 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~patchwork=sourceware.org@gcc.gnu.org This patch enables ACLE macro __ARM_FEATURE_SVE_VECTOR_OPERATORS to indicate that C/C++ language operations are available natively on SVE ACLE types. gcc/ChangeLog: * config/aarch64/aarch64-c.cc (aarch64_update_cpp_builtins): Define __ARM_FEATURE_SVE_VECTOR_OPERATORS. --- gcc/config/aarch64/aarch64-c.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/gcc/config/aarch64/aarch64-c.cc b/gcc/config/aarch64/aarch64-c.cc index 689c763cd45..3cc2c97c6d8 100644 --- a/gcc/config/aarch64/aarch64-c.cc +++ b/gcc/config/aarch64/aarch64-c.cc @@ -193,15 +193,19 @@ aarch64_update_cpp_builtins (cpp_reader *pfile) aarch64_def_or_undef (TARGET_SIMD_RDMA, "__ARM_FEATURE_QRDMX", pfile); aarch64_def_or_undef (TARGET_SVE, "__ARM_FEATURE_SVE", pfile); cpp_undef (pfile, "__ARM_FEATURE_SVE_BITS"); + cpp_undef (pfile, "__ARM_FEATURE_SVE_VECTOR_OPERATORS"); if (TARGET_SVE) { int bits; + int ops = 1; if (!BITS_PER_SVE_VECTOR.is_constant (&bits)) - bits = 0; + { + bits = 0; + ops = 2; + } builtin_define_with_int_value ("__ARM_FEATURE_SVE_BITS", bits); + builtin_define_with_int_value ("__ARM_FEATURE_SVE_VECTOR_OPERATORS", ops); } - aarch64_def_or_undef (TARGET_SVE, "__ARM_FEATURE_SVE_VECTOR_OPERATORS", - pfile); aarch64_def_or_undef (TARGET_SVE_I8MM, "__ARM_FEATURE_SVE_MATMUL_INT8", pfile); aarch64_def_or_undef (TARGET_SVE_F32MM, From patchwork Fri Nov 29 03:53:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejas Belagod X-Patchwork-Id: 102065 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 3837D3858403 for ; Fri, 29 Nov 2024 04:01:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3837D3858403 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=H2APTLSj; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=H2APTLSj X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2062e.outbound.protection.outlook.com [IPv6:2a01:111:f403:2614::62e]) by sourceware.org (Postfix) with ESMTPS id 787FF3858D38 for ; Fri, 29 Nov 2024 03:54:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 787FF3858D38 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 787FF3858D38 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2614::62e ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1732852475; cv=pass; b=xuD+O/VBp2FKZ+SmF951DSrIsahOh3cO2lf3mwx8nqs6fz0jHXBLrIs1XdtnSgjQgWf7cSkI9ZBYStmDaliYn2c8rsjabrx8OVgglAY5CY1YAdZmyqJYlY2pnfJF4OWr/KJp1qfPlJPCsNdRpuQwvF42cqWGG1Y6dGjIszJrJL0= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1732852475; c=relaxed/simple; bh=GfvqLYzZiGxZE+XiD5vTsQmsSmZoRgD4E3FwHY9OxXc=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=IeKK1vSN+zvIm9qEeoKWpGy/vQQXt3nKW/UYVR8ipwt/XokSs4ghqr8lAncR0RHfhOcOIEfX+kHZRHfHyKHrpP2e4YKpD4DPGGsluVi4JOeIprLGuE4LcP1Hg679PB733vIOAbO8gHeMicIR07yoEz1U/G5tS+F34AwYEKc+SUc= ARC-Authentication-Results: i=3; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 787FF3858D38 ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=HLeSd0jE/SBPssSqG27tRVnhYD1m8fOyhkTN8huIUFkU3otj5GnVTnymbrLOsaXyog8QEkhGa+SAMb3bh+GVVHZnIbi/WXqa+p/8bBtuW3AJ3xWS+WP5UFzim/Bh5STsqmWC5h2LGKZGHMDOcv8DfDVT/hX+kokduEF1wpbgtwqBzjYYNliNv1Lj5iovtFRQ93vwZZONo2VpOrUZRkIjiU1MvwZ98mVe842sziWqz6kkQ4cjNPgGQ0zPojCQqixNOG1k7Py5ARMvzFtPNG7uFJSicwuRwrTGU3G2VkuA54KKJQIOvQutCLAvwVLhIGIr6jyrulRUW/Li7+VVQYmwxw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=q1jXtE7VRYI+sSjIb1AOSbHq+c+1sXzBiyZGyZp9mcw=; b=tgwdU8CpwByUIrQb+Z8/1agiT+w3WmpY7IoWxeQnxd7nMLmvUnHMV/Vycfo99O7mo/4JMuMLUMftA0S+Jh5to9cNNuT8FqZ2hyKt4abl3UljW6TnE+uT/wf4TskKw2fSv+8P9rBDb/KOerSndYuQFTrlDg0uTMJUoVxG6CT2d+fzQikzs0pQ3IYO66ro6h5HpITRAeh1t864VgoBnZo1OXBapRF0G2RZX4nwIemD+WKp+sBhsdLRlpPqZjrrfgBEHidni5P00MMCA6TvjBuM8dqcO0q1x74y7UdyHAEDs8+e5pzV0TzOc2G4gbwbnYrqsyt4HKtXx14ptQX7XX1nAg== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q1jXtE7VRYI+sSjIb1AOSbHq+c+1sXzBiyZGyZp9mcw=; b=H2APTLSjYM/vhbOFs8sTkoM647lpbImIG+vxn9JhYTnvBSokkIrd5uiI2GgbXy8xsDNxsuOizdRo37OtVYDsFdTte9rhetfU+Fc4GT4QExE9pzNTcTGMXaot004Gj70MqhFaxjqJNqISqnXV1PEzsXTw+/YJBupqA0kOL6/CuoY= Received: from DU2PR04CA0360.eurprd04.prod.outlook.com (2603:10a6:10:2b4::28) by GV1PR08MB7873.eurprd08.prod.outlook.com (2603:10a6:150:5c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.13; Fri, 29 Nov 2024 03:54:27 +0000 Received: from DB1PEPF000509E3.eurprd03.prod.outlook.com (2603:10a6:10:2b4:cafe::11) by DU2PR04CA0360.outlook.office365.com (2603:10a6:10:2b4::28) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8207.14 via Frontend Transport; Fri, 29 Nov 2024 03:54:26 +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=arm.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; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB1PEPF000509E3.mail.protection.outlook.com (10.167.242.53) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8207.12 via Frontend Transport; Fri, 29 Nov 2024 03:54:25 +0000 Received: ("Tessian outbound 02553984e049:v514"); Fri, 29 Nov 2024 03:54:24 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 2af9b6426f68cb0c X-TessianGatewayMetadata: PPj4jhHZIpgGAm7e1LV1tvcfj1pFRr1x00PyNOIW5EdPGNXih+gmrCejWQrewPOtc3crC57eSIaKFz1e3MEyAvxLLU6zdqoigz/a92nJTdp2GUcW13xrsljfCCoyl5ftThWOS3/R5MNqM9stkZ8nHsHMS5IpFBk6ICCzhsFy6Ps= X-CR-MTA-TID: 64aa7808 Received: from L033d3d912a50.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 9130761A-1FE7-4A47-AB3D-758DFF246314.1; Fri, 29 Nov 2024 03:54:18 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id L033d3d912a50.1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Fri, 29 Nov 2024 03:54:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=fFnDOEAhNNMa4lgs9QTlNHJW3QxQp2gRlTM0d40ukqQvmpE0BWyyiN9YLBOblQ/9+Ga8ModuwBZGf2pg8uDr6AGtbPU+7oC/433EHPp8Agrlr4r5SAG1ZDwZ6FzflMF3aF2LBjOcLygGS6wb9CcAbOG8b/nFX7dsIjs8AxRpWLiTLSZoazZFV9w7lAvgOzDFnrIzWD0fEad3W4cwWHBQEUDXQo8rX/MwCgyd+ohawwrmlj1BnwPms5gVLKaMurCh0ArfPsK/Nm9akWC10kFwSUCPEwChb5FE3kglCZxsWsQWzQUn3nz0EOJrZ4pYfHajse30upHZfhk2i0Y/wieIbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=q1jXtE7VRYI+sSjIb1AOSbHq+c+1sXzBiyZGyZp9mcw=; b=aJdv0OqmhQ68ExmldKSpvDjnvg6Wn3jx25evj/mo/G+o3sWOJqFzqAEPmEJzN447s19tCc4FphCf7xqjVel9R63XdG4x1a08/p0fOS8OmrQbq0FGWZJTvMtEbkzHejUZZarxbSesnetHxa3yhsFS3I1MD8Cc2EwGRZ+jPIR835foLZKQQV+q5qcQjAB9ReiLRxbUeeYJQevPaK8mEJJ4SwImZtrR0/GdtwrIWEiXYuSXuOQGnN0FHbthpdISwPVpq5HWDQ3N9DlSSOS0Qbs7H5xwCb3Bm69qtzBURIkLnJNB2D6nHL197zHXFiJM05H4yHpcXC8xR2e0qK+TO69V/w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q1jXtE7VRYI+sSjIb1AOSbHq+c+1sXzBiyZGyZp9mcw=; b=H2APTLSjYM/vhbOFs8sTkoM647lpbImIG+vxn9JhYTnvBSokkIrd5uiI2GgbXy8xsDNxsuOizdRo37OtVYDsFdTte9rhetfU+Fc4GT4QExE9pzNTcTGMXaot004Gj70MqhFaxjqJNqISqnXV1PEzsXTw+/YJBupqA0kOL6/CuoY= Received: from AS4P192CA0029.EURP192.PROD.OUTLOOK.COM (2603:10a6:20b:5e1::14) by AS2PR08MB8695.eurprd08.prod.outlook.com (2603:10a6:20b:55e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.13; Fri, 29 Nov 2024 03:54:13 +0000 Received: from AM4PEPF00027A64.eurprd04.prod.outlook.com (2603:10a6:20b:5e1:cafe::15) by AS4P192CA0029.outlook.office365.com (2603:10a6:20b:5e1::14) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8207.13 via Frontend Transport; Fri, 29 Nov 2024 03:54:13 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by AM4PEPF00027A64.mail.protection.outlook.com (10.167.16.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8207.12 via Frontend Transport; Fri, 29 Nov 2024 03:54:13 +0000 Received: from AZ-NEU-EX06.Arm.com (10.240.25.134) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 29 Nov 2024 03:54:12 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX06.Arm.com (10.240.25.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 29 Nov 2024 03:54:11 +0000 Received: from a078660.blr.arm.com (10.162.46.14) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Fri, 29 Nov 2024 03:54:10 +0000 From: Tejas Belagod To: CC: Tejas Belagod , , , , , Subject: [PATCH v3 2/8] aarch64: Make C/C++ operations possible on SVE ACLE types. Date: Fri, 29 Nov 2024 09:23:58 +0530 Message-ID: <20241129035404.3363162-3-tejas.belagod@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241129035404.3363162-1-tejas.belagod@arm.com> References: <20241129035404.3363162-1-tejas.belagod@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM4PEPF00027A64:EE_|AS2PR08MB8695:EE_|DB1PEPF000509E3:EE_|GV1PR08MB7873:EE_ X-MS-Office365-Filtering-Correlation-Id: 0e76ceb6-a3f0-4d70-f68a-08dd102983f8 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|1800799024|82310400026|36860700013|376014; X-Microsoft-Antispam-Message-Info-Original: Kb7CNn+vYir2PF1X1jod9kYXc82pv78qOB/6AtREDFE1oIbBzYH8jpYg7nRxf7ttuo4ZmdwYZxdJpJJ3dEhmpFE4QS/qscHwltxgUB4anBKSRCq//i5jNPeo/IQXgbx4xvQw8plpjzdx/zuLVliGIAhDyeHv+63ST8WQwkZBzBiEEdIjp2zHAFuARc4HN994vMmPalH7KIGxWjaet071fjYUd/6k9Ph1eeUuBB1e/JpV4EtLlqjAGtOv4p4AMlrW5ueMIfHgPjA5+9FOe5yGE7+kF/0ht95iM4TTIuQmg9COII0vEb01/+MfeEb980Eoeq4QjIghPMahf7twqqxAeLfJHqzXmgEcJw74+lf/7KzEtuW38QdmvlzuTZh8tGXYODbnFNWArVnUctKRNCeGd/rWUd2PkP2wbAXvEkCm3vIK4h7ouWHo6xIbauDzg4/a3W5eMNK8xpYq1G7AByj7nxZwOOHccz+cyKQX5ntdgLWVdtKrbmLx+C2RhY/4vHhKumO168nLmyb7tJKh560ktxZZven1HZ/myV2gzVu05MZlfHXgodPqru9lgbiCr90K7TjSo77zCPSrsdsOeHcuWVE1CIwKFvpKI7v8mlrudzf+ZOYZeHN4qIyEapJ6m+7CSj7Jra/hVzJAT6cx5AaWA6z6UdyDTpXxWdELQmmPWSmGJMIs9zKLXqjjio6pNAHkWJnZoGwux0kL1eCN+ramdlOwM6tYx5QKIURk/bf1/hR/mlGk1/tlzwFhPlZwtZyO4jotMdRLoHTiU1YYpkj2x//gpBDoTs60/Iv565tuKQQUDqet0M6NBmnxD3tfdujcNwrPhhv9WLM5wvphESlTujzQBvfBG4M4+uouxHLfWihwL74is5gUcb1zF2FTZr9+0IwIJzLQPW12Pca74zFEra9zNIZMlMQRj/MdnosyWuhUdYn0iNY1kAVjuIdztinzR6PY1jeQwI4TyG6+oOTbzE3iuMtFj0scfhdunysDvAvqwwyIgFOJRNUHXCpqZJdmxL6OsZBwG7SGoJIaTqPLGvJSJFPGEkY2HR0D9HJdaEvPGuQfNl8nyPPB+1zIJ3ziCs6WucCF/Dbir3JUr5VvsUE68sYdRq2Fn6JlKLvzSlmTSz173Zso0l/hr17SKrIYOeYCTS9DVaBDwKDXGx3lWBthfhBhRwHCaeP88ca03T92c45TA186HtuReAaVpTRMbWQPraKJYhY0ca5E0yei0vlM975Y52IqP3U4AF8PRYJgFpf3gB38EVAjA+L5MC/9rjdFnH214g1QHFutPBzMGu6YldZfrMGMRlxVI3hrDyrmFQ80TuKPT7F4JrT6vdqrVipZuXBo+K8/zCGULGWFkf4HxS8LI2YI7bfsPnEhEBgL05xXcOdSNRjklaiFxPpJihQZZR+zWjNwIu/ZQwFtD53cBd80QCMgeMOVhLfQ+nGwWdWOHl7cIvDRcCddc8Zr X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(1800799024)(82310400026)(36860700013)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB8695 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:20b:5e1::14]; domain=AS4P192CA0029.EURP192.PROD.OUTLOOK.COM X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB1PEPF000509E3.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: b080dba1-aa21-4830-7be7-08dd10297ce0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|376014|14060799003|82310400026|35042699022|1800799024; X-Microsoft-Antispam-Message-Info: Ae3QhtoaKVc4RNGNq3AN5D3J3IJIM8U17hYs/F3cZpCYcihfa9WPnKEOQv1aqMYn8OViLTb2O7t4WpWlsNInX6kBDsmvnjIOVIWNpGjEytuAOwjqNIoGz3nqlRTzd8ugBItTP5HuBXDra83XHi4DPeubbdZ/AelQEwp8TpQAb4XG9I37kmxyIiSkhAncL7xiQ6arJb2nSHBTDV8yR1vk2uC+TkcoN+7QNQup9pRf85w0HbMgdp2Ice8niHa9c4DfPvzIL0xGsX/C/RYo7AmnMiaMpQ//Z7c392MGp6UP/J8LRFh53mi8+zY+gKsLABEn2XN6yZIfZA5epMp9J0AZTPEpmu4rHK8zBPosO6h4tnZp+KMQxuQDKVybCZnR6Om8u/+KkmE/CJM4HVcULx+lHpjDGd/J2U1PoQrB2ujVtFYTu0F4V68QiJvgZw0LzjlqyuOS8Wtc25E2fClIhwdSZVDQXeTPGrZYyJHzOMS/Bjo7YCY15VaY0b7/AZKU10BYp3ovtSbrpM0fJqFchyb5JoNqavbg1HeA9GxUaFnf3bvebbn/vqlLaBqUBv3L0eiRUP395MGUp+HrrmE1cPgAq8Uo5+7DrFDXuRkcw+AEnGSZeFUzfp8HsKBXxaujv9LF1gX2Fn3DtivzW+k6dPfbP+LmU9NycNhY0Qg1Fb0vTrhM9E+6lMFBSQ4zCTb4viSRtKbJuoXkNSK2R+JWsCWtY4hNAVv69CQt+txuCAq9WKW5oRCYcAWwwdeDLBRaEARtqo4tPqEZMgjF2x39raCfFY5r9uw/dMFRYcb0fRqHvktwKyMANBUefaBl6JsvBdpU8zSByXoq4ZfpJPz3n4+AU/RvqRVuVl5sO4r9JCrqvMi5btbb0H1hFgaK7ONP9CyvMcFN55+yb1ok+96lUU90bG3SrmsnItYKgAGhIWYgnOYsbMx6Qm/WgsUyzdEL/7Jz9JDw5pwvX+f8iiPiMlnUBwOV18F85/stFZuU3SqQ/CXBLIWFkPQAxVucVfV32uzUQ78BtFoK2JWDpK9oCeCyaUsJOKF2rU+nqGX+cr1hEL/FhZe8IMKQ3s2FhpyO8sS0mHc79EHo1h0nBFU9RxKlOPwTn2bahXBY7wmen4WG/+DZabdBdJgRqDutyMlP/3OZJTfNubm5pm0K83Rm5xP1WgZwtRTiEH9VL5scPJn92QP/LWjV6pt0uKISIiaWVVM0fbxPukBnJL+pQzGXFdZOs21aoX+/JNaCv55ZQIS9g+jOMWh9aJgkWRqUfIvImN2MDvO94iYSIwx5fVi7iUbZU9kuFeLQXQokw5TJqZ/z/pZ603eEdvFXTT8mjElQ9s2OkNfQIzhAPzcVnSrQBtUJ7a6gnLYc5XC0uud6scormPVDg7u4asT9nU9qx19/NBQluLi3iRlWL/uCe74EoGxv8tYV0yAT4XD1+uxoijJ9n2CyWXHLjk8pvu87AU/CEw46 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:64aa7808-outbound-1.mta.getcheckrecipient.com; CAT:NONE; SFS:(13230040)(36860700013)(376014)(14060799003)(82310400026)(35042699022)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Nov 2024 03:54:25.0313 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0e76ceb6-a3f0-4d70-f68a-08dd102983f8 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: DB1PEPF000509E3.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB7873 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NONE, TXREP, UNPARSEABLE_RELAY 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~patchwork=sourceware.org@gcc.gnu.org This patch changes the TYPE_INDIVISBLE flag to 0 to enable SVE ACLE types to be treated as GNU vectors and have the same semantics with operations that are defined on GNU vectors. gcc/ChangeLog: * config/aarch64/aarch64-sve-builtins.cc (register_builtin_types): Flip TYPE_INDIVISBLE flag for SVE ACLE vector types. --- gcc/config/aarch64/aarch64-sve-builtins.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/config/aarch64/aarch64-sve-builtins.cc b/gcc/config/aarch64/aarch64-sve-builtins.cc index 0fec1cd439e..adbadd303d4 100644 --- a/gcc/config/aarch64/aarch64-sve-builtins.cc +++ b/gcc/config/aarch64/aarch64-sve-builtins.cc @@ -4576,6 +4576,9 @@ register_builtin_types () vectype = build_truth_vector_type_for_mode (BYTES_PER_SVE_VECTOR, VNx16BImode); num_pr = 1; + /* Leave svbool_t as indivisible for now. We don't yet support + C/C++ operators on predicates. */ + TYPE_INDIVISIBLE_P (vectype) = 1; } else { @@ -4592,12 +4595,12 @@ register_builtin_types () && TYPE_ALIGN (vectype) == 128 && known_eq (size, BITS_PER_SVE_VECTOR)); num_zr = 1; + TYPE_INDIVISIBLE_P (vectype) = 0; } vectype = build_distinct_type_copy (vectype); gcc_assert (vectype == TYPE_MAIN_VARIANT (vectype)); SET_TYPE_STRUCTURAL_EQUALITY (vectype); TYPE_ARTIFICIAL (vectype) = 1; - TYPE_INDIVISIBLE_P (vectype) = 1; make_type_sizeless (vectype); } if (num_pr) From patchwork Fri Nov 29 03:53:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejas Belagod X-Patchwork-Id: 102060 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 75D393858D26 for ; Fri, 29 Nov 2024 03:56:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 75D393858D26 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=LUHw7jN+; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=LUHw7jN+ X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on20612.outbound.protection.outlook.com [IPv6:2a01:111:f403:2614::612]) by sourceware.org (Postfix) with ESMTPS id 400483858D28 for ; Fri, 29 Nov 2024 03:54:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 400483858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 400483858D28 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2614::612 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1732852471; cv=pass; b=UAYnYzGehqHBS4SDwKvVivakm8aa/HYIb1AoK+7EcT/10RMw5g0ES3mbVWlb3TxIO+zf9+J1Y2VHYqXRRb/SpgPgUEFuA3KHkAqU/jGUXU18I6Sx7KlPkbp5CzxI2GXEiDyqI+aNErtogflTkDHBtuBcEXpxCL9SWS2Ozjm8+ko= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1732852471; c=relaxed/simple; bh=7RoyNn3RFYjBFdvRmnmlra1asPTsupvq7wM1W2rcyrA=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=BxiaxJP+oW8iya5ZiBFvqKWMlT4dh4g25iHMGS7MtFtC4i7EIZEPHqLwKkYyw12x84iX/u3oQZKIl9cAe5mKb0nhiBUq7UpYu+0q8hRAAfGweSsRjy7DJdTtIMZOuRxSDZxr7g7KO1EEJ85i1KiFwUGkhD7GcFjEwbht5y+EY58= ARC-Authentication-Results: i=3; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 400483858D28 ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=iZzxyIPTtV5cyubBNg3NU+mi4a+Pg+NkDzKXq1wTq9w+CYkDhkSIWSBXXu03kErASGvXO1acBqb/JrEYBMW/xnJdvUTbyPF80K+fohE6cufzom5XvQuiw/I8KFSSsOv46H5snHKYK0CrWWl05JrnnfUqihyDksDDtx1Nl7v1nU+EXJwuJLWqfFrFiLndA57TCnkIBXoc1gDgF3Dwm0p9Kni7u2BpSouHs8dHXwkZtKtS5jwVqiERhCW2DtdDkqtARzIU8IreXtCi7SRZuuXr4ru1uPwhylh2aQJcfVBKqrAYFR+WFJ1Y/GI1DaTNlslRT+ZOJhZuiEV8W9Vy+qKKHg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=RAUBFqtSJFw4Wliup0eaPa6tdWlsXIhW0mRZtvb2+FE=; b=Ml4BXwdHzp2CVKMOzqrZixH7oSo0cVgLstyNXNeGxyOdxhk0GOuey8BzH4Q4LI2tPsin6MH9caPytTSNZuEjuD7aZIQoJGJAwZSoMzLkv7QQprpcWrz6MtMJMakY+Ja3VKpT3cssRJ5OR5liR9CKtvPTR3pVUlp80zyd7h8jpJsVcJKBWFNpoCspUauy70J7E8hHKbzFBh7rXFZrjGTHTKjIFmc0X0sGvaoQ/kqxD/51DdSqcVG3KQXNtkjxnCwScU2dqcGhHC2LCGOXNir4GArgQUE+5BJ9EokO4yGhUAt8EgPldDE/NgWc83CkWJdZoWvUOelueLpcSRRCoNxGcQ== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RAUBFqtSJFw4Wliup0eaPa6tdWlsXIhW0mRZtvb2+FE=; b=LUHw7jN+mvCegedf9KJJ/i85q4dBNAV7cDlcPZATHGJqefkstRJnKWM6fuV9tYanILCsH3lXCvzD8FPlAif+GX3hNmwdlVA6htRHSz413PZVueqwrbgxKSJ7tEcwzDV2smu9vkbvt4U9TNBDIBgWbC/U7yTX0XnnmSbI8qCnWlY= Received: from PA7P264CA0367.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:37c::10) by GVXPR08MB8211.eurprd08.prod.outlook.com (2603:10a6:150:17::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.14; Fri, 29 Nov 2024 03:54:26 +0000 Received: from AM4PEPF00025F97.EURPRD83.prod.outlook.com (2603:10a6:102:37c:cafe::5) by PA7P264CA0367.outlook.office365.com (2603:10a6:102:37c::10) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8207.14 via Frontend Transport; Fri, 29 Nov 2024 03:54:26 +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=arm.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; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM4PEPF00025F97.mail.protection.outlook.com (10.167.16.6) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8230.0 via Frontend Transport; Fri, 29 Nov 2024 03:54:26 +0000 Received: ("Tessian outbound 2e0b2b8680ec:v514"); Fri, 29 Nov 2024 03:54:25 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 53f15093b29faa46 X-TessianGatewayMetadata: 11VLXmVz1CuFGN4ifUFGUF0jMbXLdaMdZ3MtcParNnIbnMeH3+zMC1WHP9RdVXPd/F7nG5apx9kdwBz7sq+L0eSrlH1GFX/xEQu04h7cbLZALFm1NRB5zZI6uGaW+IU2V/ESCTEEY3pBaOmAN4D+/CdMoeratEhNaSXWqpA25Tg= X-CR-MTA-TID: 64aa7808 Received: from Lb5699ae5c54d.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id C5DEF9FE-471E-488D-B765-834D5E33A301.1; Fri, 29 Nov 2024 03:54:18 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id Lb5699ae5c54d.1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Fri, 29 Nov 2024 03:54:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Sd/pWnizWVjnsMwbFlNzf8oXJx1C6t8WykXP+rgpqyLUXllkaHjzihsyjq/rpl6rAHHl75tOwmu6vLt2kTFl+fMr9kfthKxJCNiw4vb9QUY1/W6k2jzMEVdltS23KsT/LS8+HuBOsMrWBBCKXTCOSNjQ38haKSHxsjnb3YOUXXZ8JaxBhX8k91WfdBXsjKHr/bDbNpWuTi4Znl65qyVE9cXCtRJEu9X23jPqNF1FRl/79FfGihODbqJC3vZOwyTAz6gov1a/AVk9zgqtIjqNSdEJagGLHnEZn5RxjQGvaoMw/UTGvBHzM5lqQ4z+Kd9hxjGkHkrX+KBdwpW/G9T+nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=RAUBFqtSJFw4Wliup0eaPa6tdWlsXIhW0mRZtvb2+FE=; b=kBTkdLDfyO5uuAdFLfhi+60ZlFlNpoNuGcPvcgEI4DgIul88/T4xil64dvx/VMMLnekChsX7ondYLtmZHqY0vZFOuLicUKXEK6mEvlx6UJ6mGu+AYCTFXWkCvLQ3srTU0PWPiZ3woP2bi82tMkabdbX6vF0LIwWwBQdpm+ra2eihYShQ/Nhe/t8y2DK152nWeiulS/iK87dYCMw9AEHnlwTm0TYKpHdsOEu7uvYQvNbSIHMZb0mwyKY5wAMianrMZ77pSDMOOdW94knkoxjRk9XI7E7wmAUx+H5BStDB3aQ5ojkP5ZOoYwdd6uSeOCdpd5OdpuOwXnCAdFp30Y0R+g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RAUBFqtSJFw4Wliup0eaPa6tdWlsXIhW0mRZtvb2+FE=; b=LUHw7jN+mvCegedf9KJJ/i85q4dBNAV7cDlcPZATHGJqefkstRJnKWM6fuV9tYanILCsH3lXCvzD8FPlAif+GX3hNmwdlVA6htRHSz413PZVueqwrbgxKSJ7tEcwzDV2smu9vkbvt4U9TNBDIBgWbC/U7yTX0XnnmSbI8qCnWlY= Received: from DUZPR01CA0246.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b5::12) by AS8PR08MB8899.eurprd08.prod.outlook.com (2603:10a6:20b:5b6::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.15; Fri, 29 Nov 2024 03:54:15 +0000 Received: from DB1PEPF00050A00.eurprd03.prod.outlook.com (2603:10a6:10:4b5:cafe::92) by DUZPR01CA0246.outlook.office365.com (2603:10a6:10:4b5::12) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8207.14 via Frontend Transport; Fri, 29 Nov 2024 03:54:15 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by DB1PEPF00050A00.mail.protection.outlook.com (10.167.242.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8207.12 via Frontend Transport; Fri, 29 Nov 2024 03:54:14 +0000 Received: from AZ-NEU-EX06.Arm.com (10.240.25.134) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 29 Nov 2024 03:54:14 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX06.Arm.com (10.240.25.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 29 Nov 2024 03:54:13 +0000 Received: from a078660.blr.arm.com (10.162.46.14) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Fri, 29 Nov 2024 03:54:11 +0000 From: Tejas Belagod To: CC: Tejas Belagod , , , , , Subject: [PATCH v3 3/8] c: Range-check indexing of SVE ACLE vectors Date: Fri, 29 Nov 2024 09:23:59 +0530 Message-ID: <20241129035404.3363162-4-tejas.belagod@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241129035404.3363162-1-tejas.belagod@arm.com> References: <20241129035404.3363162-1-tejas.belagod@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DB1PEPF00050A00:EE_|AS8PR08MB8899:EE_|AM4PEPF00025F97:EE_|GVXPR08MB8211:EE_ X-MS-Office365-Filtering-Correlation-Id: c7358e3d-b170-4788-18cf-08dd1029849a x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|36860700013|376014|82310400026|1800799024; X-Microsoft-Antispam-Message-Info-Original: 62VxAfK4ljCs7nzSy/C/eIfNkk4EWMN7+oWOS0QKCle4Sf1/EjrYqXUjF77SRnkL6NVgjZqUAP5RvZaEWMZlykP8cSZ0AcZQRUKVVJ2w5uagWsmQS4iQIwKziMF+jLYV8deP1fFJjAKY4qYwsiwoH+IMLdWRcT9D12MxgttI9wOBMRyJNnnMQrbZOW98aK3IDmRBznBf3Hpx6RspIVs1JjBouE0okjrVz9XIgMtBjmBpIX+7N94mVrSoZ65jhw8EkGAqgzwcyPtwP1t0ENbnTV9Lyzfy9s9RUvbnWdvvH9iqkX8N6iZunPZptccuOES6FdIV9NAVDoHv1APjzSr7C6JA4yMR5XVCL9be9p0dQA7TUIgbN63U4b9f86PuCiyW/Oqx5+7YULhSFeLo/3m8nMUXSsOOuxphVzbJF6QFTAiijv0kAKDNWj924Za2HU9sD+ptfruQfyolyUiqa5/OquqdDPKCKaa7OWzSYdUQzabJR8BxCm8LfGLTQJWFLuFFH7QPUo1ZHl18Uha7+++OZMs9IRj8T1B4PMFqvthINT+84+tjwdf5cJZQL7AZfU1vV9DkD0gGfuxhB4xYGta5n+4EBomkXTubNNJEILeMl2eSWfAFCqxfHrzFseVGRW+m7ekTHzRYC8krIlOLiT/zQunNiUom33eqIDRv8+e4Z0hV3VHwjvK5nvl+lysVem2ITWjsSDYxoY28DqpwGf5GWNW+WKuEGD+xa7Gd8TwNeZIc6dtRNWAkcCmjEPdj24KPUTe6NEgab+2Ya+vVpbF2rQLiDzdQFxhK2UU9WM/j8Qac8iZY0mJeeTiu5JbomXuayB46fRzbfaIDhb36QgZytkMHNFdW4ZWdM2rhKodJTlDXSYtstzdWDDyOCpy8KhUei5ay75lawR7VLAogONN76JAMnLoJ9b8GUIdfzyjeDaR04jZ4Qrm+jTYvhATOfZzRSDLskEfii/jlRjBT8U8Q3MKulH6Ogs1YNuHWYDMKrBXDBV4LSauSLRav9lqj8veL2BOvDm5wgIfDmy7YkvWPIBsFPnHE5rw91x1V+O8bhrOAOFfjf659OrQImKoS0GE1vmaL4gt5hzPwNalpMtAsMcAB/oNCvaq3ycW1XIDKtuIlV9oowqmv1/532iJEZPCIVgAwmicPBpjr2Bt12FTbU0JmQcKnKyW9QIJv1LDrk2/Go+Ms2bzEqK6+1I5r/bUJg8XQwmvwIcdAMf7Rv0IvEN20HVRglRnJy5cuqHR0CwK5dXB/T03wQ1bYiKSjXKk5titkuu/H+5K7bKeb2BRIgdMHFqZ4XcoPOYDFCtirZIjZqPMOF546oZvD6ofxFBjlOzcrgu6Q7X2ji0d4QIPRbC44ysQTAo4PJqchLi4TrgFTBFYjWeK/XgizGIRNJMZViHUUj3Zbcfsug8H0Z6szvMpyx8Veqd8nolE/BGWy/sU0p9DHSee5sr16I/G12jx7 X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(36860700013)(376014)(82310400026)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB8899 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:10:4b5::12]; domain=DUZPR01CA0246.eurprd01.prod.exchangelabs.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM4PEPF00025F97.EURPRD83.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 510f4a7b-b23d-41b3-2e7f-08dd10297de9 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|376014|14060799003|82310400026|1800799024|35042699022; X-Microsoft-Antispam-Message-Info: ZQ6iyNaI8hJcaLD+jWOCtrABKEotHM0b6s0Zj8uPtPDbSQpNhpxZGW+XVwj910nZHXbyQI9DoxMJJXvTBOXwt7Z6Gk2/d4ZE3WR8M7VyNzDkJbIqg/SjRWhCvFdZoRzsmDzgh8+ulqfZ4SYCPJtQIduZA6mulGBHx25w7sjAwEAewUg9/CzCeK5X9S1uZX+ggMzQY9qghXVSrZHTIjKXGauxHqGsQ11bFnTWSl4OTR4KCa8HIrKW7biuWwJpA76NoQpWx0zlfOQrkKxBvSQKbf//m641ZjHlMaH0+GBHODEx3gELhvC1ZjJGNyW2jiYcm9IEEEsLyEgScGsU5pTI+P8vHJzOKtFLI/Tz4YJ/zJ1PXT6CfU2EG4T/zCnT/QVs1OBAfdxNQn5ockKXDkieYoSEveAiAzVyCelP9DJEadA+bQFEqfNAzRZYtaDvNbK5f1kJnXjWhVIBQibr6WvYp3K1zinnjaiRAhQa5Ma7yhWGQzanf41haOw9jicnFF1qMSNDACcPGrJeUgVitR2EQPWc0BxthcwYrrQDjlHUtePB6otJnbVDH+2QS4eD15I2GXDcTIIQ7cv4qPZWAYa1jAWnY1N7m5pceucqiD9kIpZ9bRLzE803Vk9M1y5pBy9LuSanXOE6MPBbgWzmLAlrX2VauRqiGos4B/vi5gZzs4jEBlbb8gxt/Ha2bLDiFmzaBto4CYC/iMVvxF4+SYKFd8WHvkpWf8fzER6H2cNDvgYKjEikMWu10nEQM621nvGruTUYCA1fEeaUMwbJJziHyi1QwiAepipi4FWsks2Areb8IDP9XDD2CwLVfiSkkoPbRqHo7l3WL6xAxBypq2jsWunuWTqqd8dEz6CC0zKPWq2Hda2MzrsWqx4KW+UTmWIGFGpB7OrTqRFnj04/0x21BTlO50DgMPPDV5EcB8AVFWB3cLI5i1ZNXDWdYcSJ01T1MFPmv+bT31lfhQXp6gXgA7EmAyiy0VX46paEBfxxesxCfgYymy2kiJVniNT8Y+pime0Aw/TpLvTLYtkl0L6KtCcBG0AqPizWciy44P1kpU8XXDEj0X50ZSfAjF44Tz8YNr7xiT/rKSwC+DQB9t1j31Goy1xm4V1c+qL/QlKBuLg0jO4KzYgNL1YomZvnbE5/Ujfw7tlLnN9hlFVMWZiX/vFwVxfA/qT8XXJ/w1VHCImsJhp7IoJzTE21gk9PhPa3duYmymc4weUiFV7TpgtjcBNCtVcI64ZqYA4cL/JQJWWc8+iKEo+IYA2uMM2mEjoW7Xj8X1U2Ve+WltlEqLsMURt4OB2/uems28OoOD7tVZeNcKJvcakaX55TViEjQp912oITomWhCN4vSD2qJwGNoQCYaPIhaWN6r8HcCBRqMq9kSHj2I5MWEUBA5fEM8JGn4a5CqhEqjq8HkR+lasvHHxRWx647M+uD/3Bw/qBmjw00xf7YTWlY35RmdKamAXnj 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:64aa7808-outbound-1.mta.getcheckrecipient.com; CAT:NONE; SFS:(13230040)(36860700013)(376014)(14060799003)(82310400026)(1800799024)(35042699022); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Nov 2024 03:54:26.0248 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c7358e3d-b170-4788-18cf-08dd1029849a 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: AM4PEPF00025F97.EURPRD83.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR08MB8211 X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NONE, TXREP, UNPARSEABLE_RELAY 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~patchwork=sourceware.org@gcc.gnu.org This patch adds a check for non-GNU vectors to warn that the index is outside the range of a fixed vector size. For VLA vectors, we don't diagnose. gcc/ChangeLog: * c-family/c-common.cc (convert_vector_to_array_for_subscript): Add range-check for target vector types. --- gcc/c-family/c-common.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gcc/c-family/c-common.cc b/gcc/c-family/c-common.cc index 721407157bc..260c2e005e6 100644 --- a/gcc/c-family/c-common.cc +++ b/gcc/c-family/c-common.cc @@ -9045,10 +9045,12 @@ convert_vector_to_array_for_subscript (location_t loc, ret = !lvalue_p (*vecp); index = fold_for_warn (index); - if (TREE_CODE (index) == INTEGER_CST) - if (!tree_fits_uhwi_p (index) - || maybe_ge (tree_to_uhwi (index), TYPE_VECTOR_SUBPARTS (type))) - warning_at (loc, OPT_Warray_bounds_, "index value is out of bound"); + /* Warn out-of-bounds index for vectors only if known. */ + if (poly_int_tree_p (index)) + if (!tree_fits_poly_uint64_p (index) + || known_ge (tree_to_poly_uint64 (index), + TYPE_VECTOR_SUBPARTS (type))) + warning_at (loc, OPT_Warray_bounds_, "index value is out of bound"); /* We are building an ARRAY_REF so mark the vector as addressable to not run into the gimplifiers premature setting of DECL_GIMPLE_REG_P From patchwork Fri Nov 29 03:54:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejas Belagod X-Patchwork-Id: 102067 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 1FDB23858D37 for ; Fri, 29 Nov 2024 04:02:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1FDB23858D37 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=KkmXnp8E; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=KkmXnp8E X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on20607.outbound.protection.outlook.com [IPv6:2a01:111:f403:2606::607]) by sourceware.org (Postfix) with ESMTPS id 0F0443858C53 for ; Fri, 29 Nov 2024 03:54:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0F0443858C53 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0F0443858C53 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2606::607 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1732852475; cv=pass; b=sBRrevlY2I5eaWWUOBSbYazVftKAA5VuiOSCDtyag8Q4us/CzXCnNEqvVZ6vB4JGb0JHLT160PJTnNtMcNalXvyksQW53aQOVNbPCbbIXp8BewU/FT/F6tFDEVvI4TZc5s/qyMpLHSOBqfXB64gjKVwY8Eo2YSAdOaAeYS06xY0= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1732852475; c=relaxed/simple; bh=7cFT/65d7CwNifOn1141CBZC+xLGQLhJ0vTFaDLJXUk=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=Ao0KqbVKx9YFaVVRlOgXf3PSAeQHUlcJkK4Th2ik4wL8DZbqt3oLMGzaf1WKc0tZqDjlSmlgEZM8ZbSkhg+O8n54S64Ppt0yShM3o23xCkjGVZYLWMKUE63xPSQ7J2Fs382gGqCN+tzTk1eIwK6XRbnETI1p1KD3RtVFqbDlHgA= ARC-Authentication-Results: i=3; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0F0443858C53 ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=yC39HFyIpfxD34XVqRk/S/QrFih9+wIzqjV4mlwhxuBz6uhPwxMVFfeEmZtqOqoo3vHzNI8Op+iv3bLJe8ZjE+2aRWgm55YMmTK2/V6zHWVZY8DxXAXYDoD1OLSpSzSJZNEXNtPK2h/CZMuu7wsdcziU7eFlYGWzV2aYNpvwKurXX2p+xvupFSxZ5L4Qe6PoF7rND1wau4gBBvtdt7AId7PyZ0OJ3tqi8vMaybL+dUFDlhQyMsh+0tuWer85gkrNUPSNTYS7m9s6epCsEQEuC9YfZ0vHP1mBU709oW4pPhnH2OTyj8ZyzsrVfoYLmtqFcTOV04Who9FX+bZybZ1YPQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=L1UcvjiB2ZF3pgvSDm5Sc2f5olIOiTh8LPXJHIpA2Uo=; b=O/+rawqXTsibecmwyy8UKGM1DBUOwIiPRVhm/yr8mpUHiAha2Q6LDSgXdt9s5GQqpU7PjZFEodgoV4ZF75Ya3FItEgOq2kZyORbhauwnDFUXIARCLv9+SnCmZK7FbSs1XdJehQ7KjfSDTg9aVfTes0PxXYCFIFh42hrQQsYgb7pwpIn/CEOQ56desHRUv0WLECRIiGh06Vi4qya5+Jx+p+QsqZ3+IVVu2zKw9mEJiuI17xNLCRtLjey2Paps/+3dkoO32oBklgOt66K9vgPFRIy9aSrs1QQekcRCcv00kfxNnHecCNj5MPfUPPbCQM8LXly9Hr+2afR3pQi6mgAhbg== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=L1UcvjiB2ZF3pgvSDm5Sc2f5olIOiTh8LPXJHIpA2Uo=; b=KkmXnp8Eg/6LFcJGRysP2ReAukjikg9Y01WiKzGD93p1ODZAbyGAs+ZFLmz5NClHG9VFS7hVTVkMFvHvyUxq6WP0JvzA57YHBFYqNr4XFRzwCg0AtlhTylEQKuAWNbpyvXKGV91lUtjNJ0vZdRkeGoWf/yZSzZj7/Icx9ICRMq0= Received: from AS9PR01CA0017.eurprd01.prod.exchangelabs.com (2603:10a6:20b:540::18) by AS8PR08MB10003.eurprd08.prod.outlook.com (2603:10a6:20b:63a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.13; Fri, 29 Nov 2024 03:54:29 +0000 Received: from AM3PEPF00009B9D.eurprd04.prod.outlook.com (2603:10a6:20b:540:cafe::2c) by AS9PR01CA0017.outlook.office365.com (2603:10a6:20b:540::18) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8207.14 via Frontend Transport; Fri, 29 Nov 2024 03:54:29 +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=arm.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; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM3PEPF00009B9D.mail.protection.outlook.com (10.167.16.22) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8207.12 via Frontend Transport; Fri, 29 Nov 2024 03:54:28 +0000 Received: ("Tessian outbound 033f0ff3ba29:v514"); Fri, 29 Nov 2024 03:54:28 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 2ff448a1fe19aa8a X-TessianGatewayMetadata: Izcz0ZFnEReaT4XCWp4IC+f0LCRbykCzeufSIAUV8jxnVUjfd4QKpe+aMrTtrt4HQXI33ZGBHMD6AjTcsgphvrv3X17iTQVLA/rrPrSnlpypivUhOmc/2bagIU7Y9FIQfaywyvLG/juhH6pON5u9btrET77U9uoNCOY1td8BH1Y= X-CR-MTA-TID: 64aa7808 Received: from Lb52e95e39123.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 16B3A993-CC7D-4DC1-99A2-77B7530E9D3D.1; Fri, 29 Nov 2024 03:54:22 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id Lb52e95e39123.1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Fri, 29 Nov 2024 03:54:21 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Dif4CE+eKIh0OIiJV7nV6bfbpnfPxg0cMb8yYopMHZs97bUvV4o7fLEgMIn4PrpTyvjmN0uLFXZPnX4dzA6hHxh0XXuQircEHye3HHWzPaLF0lAgHgx2E1xtZ0eSQ3yOVUD4G8G9XA2mtt4o5N0rUcnl5NX/ELMwkXozzK9rf5L/1ge3j9Cq+Zn02tSSIcQBTNeRgSioBV45X2cetfhkeDfgFsfdjXZKdU45S9lx+wIy+P2Ze6mYBJWO33Nr5lvZhWrLVcPkyRhj5HRqyzqJYOcgnRPa0Jxps2K0JEdx1iGPBVPL0DlvteDyiQY12140lFa417D9tQxEF/hapfZW0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=L1UcvjiB2ZF3pgvSDm5Sc2f5olIOiTh8LPXJHIpA2Uo=; b=oKEcoF7TDY1HZEDAU7Dk5FxB6zId8sgfxoB1NT6PWQleVhI7O/Haiay0bAxDmCbJpqZ8IEPlrB8HiExyzTHHIgsoqJnWqTn8CEKKc/SLo17biFKl9A3ruOvRyPq6YJsrkYJSIsXJKNCyu4L9bHmu7WpHzUw4GuyVa+9ZQqAbZO7B9QV8EeIJjLAQ5Xsm0etcfS8CPjY5dDEA3UvYNMFQMT4fmrt26QsH9x5a4dFv8Xk0DwxKyQoIXgVlQE+ewnfB3F3bVW58pJS0W0clO1QiJBU0DS05e121eEpk1TbrGSEpO24DOJ/AC8cUuC+6irtAS+SUnCWwej1LrKiNyu+NuQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=L1UcvjiB2ZF3pgvSDm5Sc2f5olIOiTh8LPXJHIpA2Uo=; b=KkmXnp8Eg/6LFcJGRysP2ReAukjikg9Y01WiKzGD93p1ODZAbyGAs+ZFLmz5NClHG9VFS7hVTVkMFvHvyUxq6WP0JvzA57YHBFYqNr4XFRzwCg0AtlhTylEQKuAWNbpyvXKGV91lUtjNJ0vZdRkeGoWf/yZSzZj7/Icx9ICRMq0= Received: from AS9PR05CA0287.eurprd05.prod.outlook.com (2603:10a6:20b:492::26) by GVXPR08MB11156.eurprd08.prod.outlook.com (2603:10a6:150:1fd::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.15; Fri, 29 Nov 2024 03:54:17 +0000 Received: from AM4PEPF00027A5D.eurprd04.prod.outlook.com (2603:10a6:20b:492:cafe::d2) by AS9PR05CA0287.outlook.office365.com (2603:10a6:20b:492::26) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8207.14 via Frontend Transport; Fri, 29 Nov 2024 03:54:17 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by AM4PEPF00027A5D.mail.protection.outlook.com (10.167.16.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8207.12 via Frontend Transport; Fri, 29 Nov 2024 03:54:16 +0000 Received: from AZ-NEU-EX06.Arm.com (10.240.25.134) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 29 Nov 2024 03:54:16 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX06.Arm.com (10.240.25.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 29 Nov 2024 03:54:15 +0000 Received: from a078660.blr.arm.com (10.162.46.14) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Fri, 29 Nov 2024 03:54:13 +0000 From: Tejas Belagod To: CC: Tejas Belagod , , , , , Subject: [PATCH v3 4/8] gimple: Handle variable-sized vectors in BIT_FIELD_REF Date: Fri, 29 Nov 2024 09:24:00 +0530 Message-ID: <20241129035404.3363162-5-tejas.belagod@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241129035404.3363162-1-tejas.belagod@arm.com> References: <20241129035404.3363162-1-tejas.belagod@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM4PEPF00027A5D:EE_|GVXPR08MB11156:EE_|AM3PEPF00009B9D:EE_|AS8PR08MB10003:EE_ X-MS-Office365-Filtering-Correlation-Id: f794edf5-166a-4d75-66de-08dd10298629 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|1800799024|82310400026|36860700013|376014; X-Microsoft-Antispam-Message-Info-Original: Fo+AwY/6ssJmbCZk3/IfTbdXxPcWrRrPiuTPxch2nCrTTuntG4/7HbQOOGec4Z4gy3Tjq5T193AP4YgXN2pRI02nqis4uq2nxuMvnxwItK4FKVQJp4SrIY002o6ikfh0HfkrsCe9ofzERIAqx9EUteVxPmZxGmVvj0ie0bAsAsLgLENR7+zuo/No7+5jPB3efIdUxHvqOtZWmIztY2/BoTip0dgybwz8H4hs1cq4XmgnBFqHeDG5PQIaOfTxw8uibeiPj4wo+PfO06h395rAbOGjEQLCKzd2V1T17+Bl592dsx3WUN0K3XyFfEoZX3NmEI5vLExOBwPVB+BEeglry4XRf9YVAFXZXG0Zo/0CmclGUjmR97p/Yos4xisvJw2Kvdh8aDH7hFudiIsJJotvP/yTyNbl1tITN9KdMd6gTkPU+EklsH8JN3G1gvEOaIzfNHWsHKr2szleRSoO/pzYtnLOmEwWYe1pS4c0tR6BVzCcl9tpGD8isSfi/xzSU1ov1ex8oXsAPEIpq+Xp2WaQcDuu2Yxgt7dHRSobY3N6dMCO/OI+gxR9l5TB1OewXXf2ltMqUx3ypTV4N0OZFEoZ4BcxlKtsKKhaS4LpTkOD6cO97AS+m/Ih+NsvlMI2Q/X0Xmzboyx1EUVhkzmJ0Sg/YfxCwe17uxyx2izAX01dMiyYb9uhu4sI87uUNKaAoXbGNK6Zs1RxI7DXoUdq98mBjPlSMcge0yXEzndZSJczCwsqqpFaLiNum8IavHnAMXmJP1Np2beNHa4D61Aj8xkz2RInmU0pp/LTPvcifsAeAT28Hk4PP6fskNNiSCH4B9H1jIggNTV+Zf3vQ0EoerBMlnLUEiyrWWgsRR8CwWQ3oGLPvVGct9gN8okoDLmCosAEVWW7zNqveZczzi1ni4ChzqpZFS2Lj0y1397+D8hLKbk0iKK/Dfso+684WUxHvGoHzn8deopa/hrj3AHTTlxAMhSUsWNKDOQ1udIBL+SQoY/3g6QPTmRNi8hNxJuQV2PhBTdOLBzBxFqQhk8jkdzyk5dFjul9hTUAYIon2R0QDxgwTt7kXUqVR8viUwgn7+aj8vjX2y3sS3Jej+qcWJ6b3Is/4RhvYBlcSg/7pZXUL45I8j8yRIBuk0K9KCFLa3Bwp7tOSujyR8KDJK8VAjaKS6+qmqJ25FpxNJqUYbHIX0KSkR0A31cLLJFLjKE8MPvnJntMS6KuSibupKMYmfYTqWNRcvvL2CkRrwtU/B3Bo2AQR+nJjokqTyPvdsEZ8YcRYr0D5bYAzejoKc+mmI8WuJjPHMvWKX6su3df7fRdiuagVgpnMSW3XzLZPtEqnnBeB0NQnHL//rfXaY3nxcMWWrkcTI/GBHzTvskisc/L2yyOIpCmAPKjAyMrS1daWDip3ho6nfb5ja1Mbctia1cMnccxcgnDF/KbEN/ynXw0aCU7UiCLO3zI40NIb3FjGUNr X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(1800799024)(82310400026)(36860700013)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR08MB11156 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:20b:492::26]; domain=AS9PR05CA0287.eurprd05.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM3PEPF00009B9D.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 99391f96-1131-4e00-e62e-08dd10297f13 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|35042699022|1800799024|14060799003|36860700013|376014; X-Microsoft-Antispam-Message-Info: ziP8e2O90nQrVNC6EfgU44KunRtrHaXcMlAzDLGm8w89/ZVDa/EKZJMt82ZFoNRGVo8vJgPiwuwoXTXLO7F4Y06vWIKfle1tLdpOJRcpHkySLNQ+g2+rwKcajF6qH0Um4JDxHejtaH/x27r1vI+Z6NrchyfhN31Uk7drgvIfz8pslr1sRMOdTgmcWXKcDYksJB2kQa74GCOjdrChUEwfBcgT7ePVwB61P++dLri0fS0+ToP6bhF9GGwFMSvMa9VurCsupIGWUvtUUqedjlf4cAurBMY19xuWobtWsl6y588qWHHOEXfZyAhHE2kSD40tGquUvhZtgK8+19uOVvh/dx+HcUUcmyqlIYAlO2g8O5ayODhC5Tzxaw00pZQ3z5gzYqKjHqLe7nVLqnoVXNq3mGOVHNANgmWVhFynPs4mVI1Sz3Dmf3G42aKeSQalGtlryFPpUUWRfxJpQDB6mjJkOal4SNA7WPo9wmAwmrZ8dSPr36+wOTZpMEYUAy8wCl4mYtPG9R/g2jYs4kOtrdWy3ukOTqgEPcTiGDsgWoBIcjDPQv+pJaYNOII0geXWi2ImqWaPZRZRxN/QCuO51EnBcVgbfNoJ9dCcsz1i5pJkk8GIjOS+TRRVj3WKQNqcNWJDBncLGlnVIqtTdo3+1cyPGDkhqcz22eSm6fz9ZFMJn0xUJGJnNpSE6gqb9pwMOm03ZfUUuzjFx20x9lHRfdK6Y/xBaV5pjEuOuMlpAhMyVG5wlbFD5+4iBSab7QGSxC5K+faBlxgxkUc24k8yhKmL2SnarZYogH9eHz5i39SCnvelesJjC68XCsmLyNRTWssGqTWD3ipjbEt3M4VYG18fei5GMo7G/luktayrwtJSiUvdu1uNy+kDbIkQyRBBUdyRLovIto4SsmraJlDaKCtn3eIMHB8e8fhjTpnrydxNr7Tbpqms420rO6D3f7F/pgHQO1JYueH7aqFPkm/FiFEcyM1cbCZtO8KLPpo4VG/P6sJbD4wEOzlekJqCtNN8Qa0GkKP3jvwTprWv88rt7v+2FTh5iFF5cyxCxnYJZ8GdKWodwjIRHljcjts/F3CnwhXJFCv9axB9qSvM1k1ZEsKiw8FwFa/TLmYyVAcS+GeQDxs69stnJTmReCvS6lnUHbkaSLru5KLvlj6Yaqj4VwKWIEFnwsDUC4ccdatESA615gLtgJL2ImPm5HgP2GxsUPQgzQst0A3RRvAFjw1vQP8txAbEwGJJbnHLByvpHZhBJgmdkbvG560IaHBRlgGzZ2MNRh/W9QvrlRCvFHuVSy0BniCJWD8tKZpq3o4OKToXFUYrhrSr5fflqkUg7EK23UpTsG7ubHwWO0ZDqKYE1RQebfcdiGTwvSZLdhcU67dJDShQIR03Fn2cwOXZiIU/vXHGNBDQEoAxxz6DW6enz/UzkytjI933w9t1gMU47HK7bJsjWG5nlps6Eie8idRaijvS 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:64aa7808-outbound-1.mta.getcheckrecipient.com; CAT:NONE; SFS:(13230040)(82310400026)(35042699022)(1800799024)(14060799003)(36860700013)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Nov 2024 03:54:28.6417 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f794edf5-166a-4d75-66de-08dd10298629 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: AM3PEPF00009B9D.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB10003 X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, SPF_HELO_PASS, SPF_NONE, TXREP, UNPARSEABLE_RELAY 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~patchwork=sourceware.org@gcc.gnu.org Handle variable-sized vectors for BIT_FIELD_REF canonicalization. gcc/ChangeLog: * gimple-fold.cc (maybe_canonicalize_mem_ref_addr): Handle variable sized vector types in BIT_FIELD_REF canonicalization. * tree-cfg.cc (verify_types_in_gimple_reference): Change object-size- checking for BIT_FIELD_REF to error offsets that are known_gt to be outside object-size. Out-of-range offsets can happen in the case of indices that reference VLA SVE vector elements that may be outside the minimum vector size range and therefore maybe_gt is not appropirate here. --- gcc/gimple-fold.cc | 2 +- gcc/tree-cfg.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/gimple-fold.cc b/gcc/gimple-fold.cc index 5eedad54ced..4ad5ae03d91 100644 --- a/gcc/gimple-fold.cc +++ b/gcc/gimple-fold.cc @@ -6293,7 +6293,7 @@ maybe_canonicalize_mem_ref_addr (tree *t, bool is_debug = false) (TYPE_SIZE (TREE_TYPE (*t)))); widest_int ext = wi::add (idx, wi::to_widest (TYPE_SIZE (TREE_TYPE (*t)))); - if (wi::les_p (ext, wi::to_widest (TYPE_SIZE (vtype)))) + if (maybe_le (ext, wi::to_poly_widest (TYPE_SIZE (vtype)))) { *t = build3_loc (EXPR_LOCATION (*t), BIT_FIELD_REF, TREE_TYPE (*t), diff --git a/gcc/tree-cfg.cc b/gcc/tree-cfg.cc index 9ac8304e676..87f9776c417 100644 --- a/gcc/tree-cfg.cc +++ b/gcc/tree-cfg.cc @@ -3175,7 +3175,7 @@ verify_types_in_gimple_reference (tree expr, bool require_lvalue) return true; } if (!AGGREGATE_TYPE_P (TREE_TYPE (op)) - && maybe_gt (size + bitpos, + && known_gt (size + bitpos, tree_to_poly_uint64 (TYPE_SIZE (TREE_TYPE (op))))) { error ("position plus size exceeds size of referenced object in " From patchwork Fri Nov 29 03:54:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejas Belagod X-Patchwork-Id: 102068 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 2BF723858D37 for ; Fri, 29 Nov 2024 04:04:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2BF723858D37 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=YFldl4FL; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=YFldl4FL X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazlp170100000.outbound.protection.outlook.com [IPv6:2a01:111:f403:c201::]) by sourceware.org (Postfix) with ESMTPS id 8DB6A3858D35 for ; Fri, 29 Nov 2024 03:54:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8DB6A3858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8DB6A3858D35 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:c201:: ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1732852483; cv=pass; b=p6hsuyy0jB2YWc2ydzc8uQf8iLTkwWwCskCpcLYCsqA/94i+Vp1KfbwMOut8jULc/aGTMQVfInDNF5P+rUEI/UFIhKiLhdu8d/7K3g6zwCTExD/L7hgJglzYJwiTPfQ1vCxcRMP6Ws0sH17aTZCWzWoDzItCqTPmk8XYIcY6MW4= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1732852483; c=relaxed/simple; bh=YpV08sI3rQW5J92B4Uwme52tN/9Ttv0fn0ozS4e5zoU=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=SBOoBXddfBAdDGFM0iT4gK21IEXcMoT+AKSqS1E2KR3P5OjM2z4WD5DsjnG4l9vVbwqrt1O5rqCEwMO1H+Qn/XVyYQ/bT99wldwuhcliadsYrWFPPSEgsr2a4FKU/44uuBsSVtzHb/391KZRMw32SD0L6dp1UV6+vjKw27JgveY= ARC-Authentication-Results: i=3; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8DB6A3858D35 ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=NIlwSOuH6kgPhca+35tFyTnTcWMWM2k6SYNyjrzPlcT92q/QQ4/rA/OR8aGuAjk7O1oPo33PoXMdka38ZfKKU0guIgps8bpt1jQWPZpSDTYLRetpMaKIuGTFz49+I96WY0w1uYQggOrYoxm5OujUj23rjJKmlJ2/VCr4MKyz5MtDrcp9uHfBjECF5U9V2/A1u5qWCTyVo+rnwWGVIzEBzFtnoPFPVJ3IJkPPWCosWxRKq2tGe37QcYKpkcUOtHRfK3AdslZeZ7u1DgbfAdK8MFDCU6A28PYaAJs+WKFpGo8PTz/cGLwYKkh0/pgAo/QX6AG/XGi5mkWy/rylC4oMFg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=uCw9KzSMMqr7QPukvtdUvgzVK6uXKfWmcM0q5Fm5hAw=; b=d19WUhqjhSxXo/lnw33rSnjf4HNlORY2Fgvth5rRoVjTz9Vxnt+XEp8BtZa7mQ3tpkiaRypeDcX8XXQrGVfoAN7TEvv283/M3MN3xFFgsaTEuJqlIPS1GxgfUrEB/YMoKEbYkkPJ+NdABzEzyE27mos9GXvtfMkeT3v5VJJaHtfIkr9PnBJCcdbqeNxkhHiCucaINzJIettH/O77PZBbw5vXeaYV6RfV4o67qfK5V2tEgmAGBcOktxNkrMgQesMQRXofLa/afo31dIsxKT+9xyc0iHaddVspRjQsei9Cfk6n5k2Jqkvf/YdWMYyLjd1giM7bnQzl5NTMY+8lDygVnw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uCw9KzSMMqr7QPukvtdUvgzVK6uXKfWmcM0q5Fm5hAw=; b=YFldl4FLGBAXC0IR/D3q4TVQ5YyRLCFxZg+QXKZgPV7csJu64BM4od7Xdj2VIbZeXQ6Mrk1bx2nJUQABEt12e4IW5FbXfXondmharMy4JUrStqizLg8DLUjWntg+IOog1poPkO5AnwA9xBPlioxmKc800f4Ir/UAQQWUKWWf2Ng= Received: from AS9PR05CA0203.eurprd05.prod.outlook.com (2603:10a6:20b:495::13) by AS8PR08MB8567.eurprd08.prod.outlook.com (2603:10a6:20b:566::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.13; Fri, 29 Nov 2024 03:54:37 +0000 Received: from AM3PEPF00009BA2.eurprd04.prod.outlook.com (2603:10a6:20b:495:cafe::74) by AS9PR05CA0203.outlook.office365.com (2603:10a6:20b:495::13) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8207.14 via Frontend Transport; Fri, 29 Nov 2024 03:54:37 +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=arm.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; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM3PEPF00009BA2.mail.protection.outlook.com (10.167.16.27) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8207.12 via Frontend Transport; Fri, 29 Nov 2024 03:54:36 +0000 Received: ("Tessian outbound 5b75617ec243:v514"); Fri, 29 Nov 2024 03:54:35 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: e355a1b393e101c0 X-TessianGatewayMetadata: Edpawsj1kbT76a2Z2HDVaY5vpq0fUxF49+VmIyWLmtOonTa521+3Vdzu9YLAYYc5Rujjn++mIkXy9VbG0Hy1f9aJTr1NA+EAk1tJUmsHaC9XNwgbHHu9Gf0iL0pmnblZwFwHeFId6CphDbkppM5mESIg72ULdv5nVb/ROy41IGc= X-CR-MTA-TID: 64aa7808 Received: from L1876383d72de.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 4C2E80A8-94B3-4A5A-A41B-928FBBAFCB58.1; Fri, 29 Nov 2024 03:54:28 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id L1876383d72de.1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Fri, 29 Nov 2024 03:54:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NP8VNWURETlIXnRApSID4CWwgHbZ5BvtnGYrG2Hh2/ZSKqbXJ4+ORz6GZtt4i6t9Ewk4rTbrvpPVmgb9nneSuddPAUpMdL62JPW4boRoJVpUvvZJoL5/WKKyeumGkHVI/e1t+G+TQGv2ItZprPRRskX5tDBJAIyylgz/hG+3sKUWNkQDQrwlWbO4dIEtVzqJLVw5FrShIBIWQWrRQQXXhy/S6DNqYWp3Ngor4igeh5qn59JZh3QCwBkgB636kra7sf+cE/enLzjMGK5e/8akNX/IzPwg8WOKm+uvHfR/TDDzqju/fVFhcMhD0RGFTynaWDilbZO2HUJQvdCSRNP0NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=uCw9KzSMMqr7QPukvtdUvgzVK6uXKfWmcM0q5Fm5hAw=; b=N1/RaBK3kpTuQi4LUgZnZoN5nvmsqE0ZQ8HzkzTaIyENmaVZpuJQ7nCw2DeUpsvm1jqmaIZoq3rXL0vUdBAKGqNNNat+E/+8niuEfoH9RCdTUDfU/ULre2K8hcLHa2tgs5LaWF3lFVgu18D1TcCdl/xhyUVVUtLHRvMyvHXDsyWmYSgf0T7wvkIEeDDYtsRWh3Mhn4e9tLuEQfpPexMmraspvUam+c3TIitAfEgD13zz4irJ+svDLKyEs2XMRPl6jTZuSk392SZKMmpgyX5tcYZdfqRpZjPydNVvW6m2o/5RSVL4+KEArO6XVmyanDGuF2VoTQ9MycT0NFy7Qo2x4w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uCw9KzSMMqr7QPukvtdUvgzVK6uXKfWmcM0q5Fm5hAw=; b=YFldl4FLGBAXC0IR/D3q4TVQ5YyRLCFxZg+QXKZgPV7csJu64BM4od7Xdj2VIbZeXQ6Mrk1bx2nJUQABEt12e4IW5FbXfXondmharMy4JUrStqizLg8DLUjWntg+IOog1poPkO5AnwA9xBPlioxmKc800f4Ir/UAQQWUKWWf2Ng= Received: from DU7P190CA0014.EURP190.PROD.OUTLOOK.COM (2603:10a6:10:550::12) by GVXPR08MB7749.eurprd08.prod.outlook.com (2603:10a6:150:69::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.13; Fri, 29 Nov 2024 03:54:20 +0000 Received: from DB1PEPF000509FB.eurprd03.prod.outlook.com (2603:10a6:10:550:cafe::2f) by DU7P190CA0014.outlook.office365.com (2603:10a6:10:550::12) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8207.15 via Frontend Transport; Fri, 29 Nov 2024 03:54:20 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by DB1PEPF000509FB.mail.protection.outlook.com (10.167.242.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8207.12 via Frontend Transport; Fri, 29 Nov 2024 03:54:20 +0000 Received: from AZ-NEU-EX06.Arm.com (10.240.25.134) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 29 Nov 2024 03:54:17 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX06.Arm.com (10.240.25.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 29 Nov 2024 03:54:17 +0000 Received: from a078660.blr.arm.com (10.162.46.14) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Fri, 29 Nov 2024 03:54:15 +0000 From: Tejas Belagod To: CC: Tejas Belagod , , , , , Subject: [PATCH v3 5/8] c: Fix constructor bounds checking for VLA and construct VLA vector constants Date: Fri, 29 Nov 2024 09:24:01 +0530 Message-ID: <20241129035404.3363162-6-tejas.belagod@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241129035404.3363162-1-tejas.belagod@arm.com> References: <20241129035404.3363162-1-tejas.belagod@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DB1PEPF000509FB:EE_|GVXPR08MB7749:EE_|AM3PEPF00009BA2:EE_|AS8PR08MB8567:EE_ X-MS-Office365-Filtering-Correlation-Id: 33c938a3-acf1-40a0-60b9-08dd10298ab2 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|82310400026|376014|1800799024|36860700013; X-Microsoft-Antispam-Message-Info-Original: 4fuUeJoQw5NlVN/rA/M+xUzBS1pxUmcDqAqzbgFUyTdhEBfznSIxEiiE83ki6z3TKJedpqE1gn/V1Rq0c9sdjPOldvd4QK/W6lD1blIbmCJ0frVnWnI5XgNnbm6qECLVUXBAFbZXEGeZPlWquTADwRK4CdWSYPmRDH/fzZaQnThaUiMA+kkB8YLBCDPnEOJPAsYw9kDPRpMdrCEqvpcPil+5B4pCa8GXc5yOONQSIjiK9JmvGeKroUn13jB7MFRAcLFQUOL0GfdN9DX/gjyHmcKyTl9C4eh53M72qejkDaDUOhi77kCOsW5VqwRfFtpOB2oZqbTD1q9N6BwwVw4UbZvT89L8rE7vyOjWrX8M6qpMNpN0r0wJexUBvpnoeIpupNNWblQgwkQRPRWWmb/kplplBw4RrU19cKQNGP/m24FLRC6cviFfgj2zqJoik5bRhOxzY/sWYqWHpyfHgjRTGYwzJl37hcyoT64BZSAIewwaZ3NhnLg4siTXjtXgs2P4Itmq14uGWZuBnmVBnvhPU85ni+DP4zejZMJ2D8rGsRGLhuwmMaDNHisGhWig+n0fKH0Hn5OUzEm/z2EtVKRlI2F4xUGfZyNfBXYXftfPu1GZpyftyTc7k5jA9UoiCsWFHQFZcg7kiLCijMv5HoTgRMennXBS59bTzeFfEFC241vjpzIfp6nPyemah8mZnE/a1qCWW29nFJd5BhwVBp09eX91hotvQNMPTp/ZbvA+A2mgEWxB1C1nCGZsZ8hyWxWsWJvALS7ZP3hlawFbL4tbehh4VFsA9ZH93oftjxW1uJZ3RLiy4zHww+/PNsT4NqD+9Iiw4jNSpSHW4g+mL/dY0z9kyQBBdKQAsV2RNrMmmV4Qe7oTcZkl5vVWNhI9xeH6i1BVUr7xjQclQflTRJbfOL0jm33vQY0Z/+3OOyAVHVFuaJNeJyrqGkpyYqr7+jZduYLgaQSCcPO0HpY+QLa/UggYC9dtDMG+HtIsfOj560EJkXVWcdrz+UmGzvxdYR777iv9eZjSS1yU0SG0qLpg8o53lQQJ3PvlDMJe9okuEvHK15c+nPRGKVbn/uKsucs8D7l9ovkw5OufpXSsSrey8e7Q8zgWvsySD4ojz2j4MU1ZZoL2EQb3xGB8sPsOnJBUg4fALu2dkOn+kUWeBox+Uhm5CH8J7IlhJdfU2Udwv0UVcn8kB2/dsDVuOF6hCER6HHYDidEG4sf7jCoUh0FZi8teqRD3FVSLGGLD/SsYqfMIdPo1tPONOx58UhPBQkGNEl7bncSGs5AWbcf3hWs53R/5h9uAyHvT8V7Fw3ayc3ZAO+KJl6w1AsffxLitc4KoqREhUwbWZ8x4PM3HPth9p6Iid/VW+vPm2qQDTY+BKS78g+oERHeaasGIkWAbAKmt7QRfA/2qipOkj9VdCw0Smw== X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(82310400026)(376014)(1800799024)(36860700013); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR08MB7749 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:10:550::12]; domain=DU7P190CA0014.EURP190.PROD.OUTLOOK.COM X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM3PEPF00009BA2.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: ab114d1d-619e-40d6-ca14-08dd10298107 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|36860700013|35042699022|82310400026|14060799003|376014; X-Microsoft-Antispam-Message-Info: FRd8WS47GhOh/F1N+y6XJRVIG0nGF5xRzJYHu+GYAUDT+nVtXeZkpyQo46Yj5Q7VOfGwGocmdS7zJulmKAv3HqjQ7T8azdZ60oSzbJukz6vV2yVoxR6kYBmpnWFORg4nLgEhhOVAChJyqOho6QJBSEkPehKMjIz1D7dkkdOn7em1pkW+lhzromEPCYKLkhch+LtCQhf88pZrGWR/KkAHu6rsYlBm+4/IU3rqhhGxiiK3D5cuisDlLSGWLw5/tKzOnGZvWWJobqggjCwBI7sfQLjJqLZ//4Fjo3QnWC4MCioicbfV3vAf5Y9l2tjmTt0f6Afuzh+ufwP9wXK98D3b0UtglEu1LPEUgacJXSV2AnDRApt3Q/LgEiN81tzDWDr92S0YbSALy7olr5lRyuMmHs+eIMFam6hlC6YxKGwvqUVwhFM+uu0nVCW1t9yM/+vOa2vFC07yhSSHlQ05rrmrf1qwWBhh2Fz+u/fWoiBSME/a4CD4ZW96YejiZgspeFySWSTnZCL7/K9btgIznu+tRUsSny/l/k9W79UaeFO2n2b4Fv1UUqF7T9FG1MD79/nkcal8CXRJE6hlbCBV8DiujgKD2xjImrlr/hF9srF2KRxE1zMJEAxWIS5/XtO+YiP9c7B96dPxjtIrwe0YmZFTK/kpB6+5xTo6UAvkLU57yu8xlPKw5ETWNVwYPK3t/u2oAB14sT9vjW2WbMYH5sXKC0PhaixGyMmcV8RcEIMw66U5CR4lkPJRYNyVH99ckU3tR37Xl0HB2oVKqOmP+xxyQvJhmiejQHpWMmDcmgO2TpV7YVa2hcchIz5F9pLRiBvF44xeFO11rsFFqVYhFhNOQ6BbnfMKcFbF21M2bvZGT6IkjYAwGzvuaUVWiXUAhZTXoA+MyU4cEmdCEVBQNm7uuqXsoFBYwzJCLG2Jtpx4NXlFwOfzKeG/wQC7f0mwwbLNtkuMYWA9D+6Z04oB9e5mKpaId6pRweA3f6qc4YC229IjhR9E+g81gbiOt6vIOL7YN+sjXAKVleyPmI8kXo4+g+Lsk5in56RPCrtuCvgY2rdd3hKD0A691eqWQp1R+L8KyhMjCuwGa8PDXBS08aRnNNDaZD9krWiie87r3DN91UUN3rCZG6ZShr6rfKKOij93jfVI7ZfpYXP+QyMy7cG299+sOYvFoVDPwn/Fs/LeeLJ+GLs2jF//cjYDJbfNiihJvTIFO8aEtkxa6hxVEYvRbQ0wAxBkcofHbVEyGdke+mbShdgzouNJSOf9BjIR+DqMLxRxqGcje9N50SeXfPqJ8DiJH6b6+S/LtoO2Tmn6M0ShRjyc+4nHWbPUkrpfyByG47WARl0fV3kXQBVMrGKBgCeWa3DInVWVYYjYPOU5jwd2oZv7/nsCPv3N0sAbt9ZidBPN+oXrI5DLV4AJQ+DjkA== 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:64aa7808-outbound-1.mta.getcheckrecipient.com; CAT:NONE; SFS:(13230040)(1800799024)(36860700013)(35042699022)(82310400026)(14060799003)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Nov 2024 03:54:36.2503 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 33c938a3-acf1-40a0-60b9-08dd10298ab2 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: AM3PEPF00009BA2.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB8567 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NONE, TXREP, UNPARSEABLE_RELAY 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~patchwork=sourceware.org@gcc.gnu.org This patch adds support for checking bounds of SVE ACLE vector initialization constructors. It also adds support to construct vector constant from init constructors. gcc/ChangeLog: * c-typeck.cc (process_init_element): Add check to restrict constructor length to the minimum vector length allowed. * tree.cc (build_vector_from_ctor): Add support to construct VLA vector constants from init constructors. gcc/testsuite/ChangeLog: * gcc.target/aarch64/sve/acle/general-c/sizeless-1.c: Update test to test initialize error. * gcc.target/aarch64/sve/acle/general-c/sizeless-2.c: Likewise. --- gcc/c/c-typeck.cc | 16 +++++++++++----- .../aarch64/sve/acle/general-c/sizeless-1.c | 13 +++++++++++++ .../aarch64/sve/acle/general-c/sizeless-2.c | 12 ++++++++++++ gcc/tree.cc | 16 +++++++++++----- 4 files changed, 47 insertions(+), 10 deletions(-) diff --git a/gcc/c/c-typeck.cc b/gcc/c/c-typeck.cc index e429ce9d176..709410bcf19 100644 --- a/gcc/c/c-typeck.cc +++ b/gcc/c/c-typeck.cc @@ -12069,12 +12069,18 @@ retry: { tree elttype = TYPE_MAIN_VARIANT (TREE_TYPE (constructor_type)); - /* Do a basic check of initializer size. Note that vectors - always have a fixed size derived from their type. */ - if (tree_int_cst_lt (constructor_max_index, constructor_index)) + /* Do a basic check of initializer size. Note that vectors + may not always have a fixed size derived from their type. */ + if (maybe_lt (tree_to_poly_uint64 (constructor_max_index), + tree_to_poly_uint64 (constructor_index))) { - pedwarn_init (loc, 0, - "excess elements in vector initializer"); + /* Diagose VLA out-of-bounds as errors. */ + if (tree_to_poly_uint64 (constructor_max_index).is_constant()) + pedwarn_init (loc, 0, + "excess elements in vector initializer"); + else + error_init (loc, "excess elements in vector initializer"); + break; } diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-1.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-1.c index b0389fa00a8..747bac464a5 100644 --- a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-1.c +++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-1.c @@ -38,6 +38,8 @@ void ext_consume_sve_sc (svint8_t); void ext_consume_varargs (int, ...); svint8_t ext_produce_sve_sc (); +extern int bar (void); + /* Main tests for statements and expressions. */ void @@ -69,6 +71,17 @@ statements (int n) int initi_a = sve_sc1; /* { dg-error {incompatible types when initializing type 'int' using type 'svint8_t'} } */ int initi_b = { sve_sc1 }; /* { dg-error {incompatible types when initializing type 'int' using type 'svint8_t'} } */ + svint32_t init_sve_vc1 = { 0, 1 }; + svint32_t init_sve_vc2 = { 0, bar () }; + svint32_t init_sve_vc3 = { bar (), n }; + svint32_t init_sve_vc4 = { 0, 1, 2, 3 }; + svint32_t init_sve_vc5 = { 0, 1, bar (), 3 }; + svint32_t init_sve_vc6 = { 0, 1, 2, 3, 4 }; /* { dg-error {excess elements in vector initializer} } */ + svint32_t init_sve_vc7 = { 0, 1, 2, 3, bar () }; /* { dg-error {excess elements in vector initializer} } */ + svint32_t init_sve_vc8 = { 0, 1, 2, 3, 4, 5 }; /* { dg-error {excess elements in vector initializer} } */ + svint32_t init_sve_vc9 = { 0, bar (), 2, 3, 4, n }; /* { dg-error {excess elements in vector initializer} } */ + + /* Compound literals. */ diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-2.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-2.c index d16f40b5f2a..33cd21610ea 100644 --- a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-2.c +++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-2.c @@ -38,6 +38,8 @@ void ext_consume_sve_sc (svint8_t); void ext_consume_varargs (int, ...); svint8_t ext_produce_sve_sc (); +extern int bar (void); + /* Main tests for statements and expressions. */ void @@ -69,6 +71,16 @@ statements (int n) int initi_a = sve_sc1; /* { dg-error {incompatible types when initializing type 'int' using type 'svint8_t'} } */ int initi_b = { sve_sc1 }; /* { dg-error {incompatible types when initializing type 'int' using type 'svint8_t'} } */ + svint32_t init_sve_vc1 = { 0, 1 }; + svint32_t init_sve_vc2 = { 0, bar () }; + svint32_t init_sve_vc3 = { bar (), n }; + svint32_t init_sve_vc4 = { 0, 1, 2, 3, 4, 5, 6, 7 }; + svint32_t init_sve_vc5 = { 0, 1, bar (), 3, 4, 5, 6, 7 }; + svint32_t init_sve_vc6 = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; /* { dg-warning {excess elements in vector initializer} } */ + svint32_t init_sve_vc7 = { 0, 1, 2, 3, bar (), 5, 6, 7, 8 }; /* { dg-warning {excess elements in vector initializer} } */ + svint32_t init_sve_vc8 = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; /* { dg-warning {excess elements in vector initializer} } */ + svint32_t init_sve_vc9 = { 0, bar (), 2, 3, 4, 5, 6, 7, 8, 9, n }; /* { dg-warning {excess elements in vector initializer} } */ + /* Compound literals. */ diff --git a/gcc/tree.cc b/gcc/tree.cc index 3ef1b6b483b..ec7746dc0da 100644 --- a/gcc/tree.cc +++ b/gcc/tree.cc @@ -2084,12 +2084,18 @@ build_vector_from_ctor (tree type, const vec *v) if (vec_safe_length (v) == 0) return build_zero_cst (type); - unsigned HOST_WIDE_INT idx, nelts; + unsigned HOST_WIDE_INT idx, nelts, step = 1; tree value; - /* We can't construct a VECTOR_CST for a variable number of elements. */ - nelts = TYPE_VECTOR_SUBPARTS (type).to_constant (); - tree_vector_builder vec (type, nelts, 1); + /* If the vector is a VLA, build a VLA constant vector. */ + if (!TYPE_VECTOR_SUBPARTS (type).is_constant (&nelts)) + { + nelts = constant_lower_bound (TYPE_VECTOR_SUBPARTS (type)); + gcc_assert (vec_safe_length (v) <= nelts); + step = 2; + } + + tree_vector_builder vec (type, nelts, step); FOR_EACH_CONSTRUCTOR_VALUE (v, idx, value) { if (TREE_CODE (value) == VECTOR_CST) @@ -2102,7 +2108,7 @@ build_vector_from_ctor (tree type, const vec *v) else vec.quick_push (value); } - while (vec.length () < nelts) + while (vec.length () < nelts * step) vec.quick_push (build_zero_cst (TREE_TYPE (type))); return vec.build (); From patchwork Fri Nov 29 03:54:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejas Belagod X-Patchwork-Id: 102062 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 B7BA33858D26 for ; Fri, 29 Nov 2024 03:57:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B7BA33858D26 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=DUcaupmb; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=DUcaupmb X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR03-VI1-obe.outbound.protection.outlook.com (mail-vi1eur03on2062d.outbound.protection.outlook.com [IPv6:2a01:111:f403:260c::62d]) by sourceware.org (Postfix) with ESMTPS id 85C983858D26 for ; Fri, 29 Nov 2024 03:54:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 85C983858D26 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 85C983858D26 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:260c::62d ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1732852483; cv=pass; b=O7c4yMo6MYZ+nK+v2WPebp+fH2VTeuJmDg0acKXuDdXwrVZmW1Q+qV309KBFsONerNl9FifJ9L551zzKvjJw8TBGblEQj9lEVfnit8//r0LAM2cszMZ1jbVyuLVGUrAfVcuNRPqQ3hE2Vm5UfaZX37Ir2zHXrB7Y2PI/Um4ICKA= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1732852483; c=relaxed/simple; bh=dTjWdDNLUbT7Jws8f6fZkjiEs26R6RRUnXwKl7F7i6k=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=ZhVXDIkzY2XsCipHXdjoVxf39qq8Q2QKE0Q37qnOlMvqzwAcuZHvkgyeI5jY0oZVb6krRclBLVXIgzn6nHENLzSXNum0fpSmkXTGke5uGlpRYvBbeBECrBRmhjuY0BAjnJv0r8VLlWIAsCVp9cmeh8EHlcccU8+9cMuP4j7Q96Q= ARC-Authentication-Results: i=3; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 85C983858D26 ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=lSaNlJ1/2FL2PP4AuijhipZ6rhTvZ/ctiVIyb18sfuuNzuG/Q19LjxemQAhsps7HqfkRL687g5xY+IQ7iHNQQKPmqlkMop0sSKDmC55T+hlTW9Iv+s57MCcYipYW0aZsTz2wxLcCRqN/vr4rXG9AwpSx6afwYiXWgz8/gn8YfV0k3xVRsbLUT3mtsR9Q5pepcnRwsnLIBnPXWzw66iJvN/zqbfHEoTUnBejogG7N01B5wSbX9g5CaRxDTlGUK5Kz3RxqyZUOVcE49jrxhMRihl35pzInSeyTnF6sgYUa9LT+qf4KtKcYzflWxh4nyDJbswjg0jy+yEh8uvo5RkdDeQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=NhlydcR664pqFr2/zA64B5qVz7jFQlf9PE1j1txts9A=; b=sW25wtgdTX9S9vAgezaGUZ8yrWd55QCydmJbJZSuBQ37B/o5HPa1qS0CiyQOoS0G55F9gI5RRvsqU4RUOYpUOa6kYYDcCLRKUUmGsrp3nQcmVg6IKhGhCVvd4o5TOdeKLxVddJ9izFR3zckJrMuRqcIZ/p1iees3N8Z4Gqs2eTUU7OCbURYP6Qh9Hm8ymfDjy+uhUW/t4UMdC0lOAhLDbeoij5GoxJyB1MPCjKlZf8jj9d/32oH2Mfhkdg/duzLZYn+Vce7IgIa3LbksmhmleklqpJOq8HpYiBvt3zHYhSfTFJfA8dvIRU6iRks2lyNLF3UHoqjQjmSUTNrDCFmPxw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NhlydcR664pqFr2/zA64B5qVz7jFQlf9PE1j1txts9A=; b=DUcaupmbffETZis+KQHFawbiUw+sidOY0MYfWjd/jZyHp+0yqB8hmqSjfKBhVI5PXc5UQMas5a2g+j2eAhnevMN9yc8hNOjGxK8WymmC4FNXnmjujDlGUTGwr1H243ayPhwFg4DTGB9NmVslHxPOyv4gxBPN7PmSJlVf4r2ekmU= Received: from AS9PR06CA0208.eurprd06.prod.outlook.com (2603:10a6:20b:45d::23) by GV1PR08MB9914.eurprd08.prod.outlook.com (2603:10a6:150:87::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.14; Fri, 29 Nov 2024 03:54:35 +0000 Received: from AM3PEPF00009BA1.eurprd04.prod.outlook.com (2603:10a6:20b:45d:cafe::c4) by AS9PR06CA0208.outlook.office365.com (2603:10a6:20b:45d::23) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8207.13 via Frontend Transport; Fri, 29 Nov 2024 03:54:35 +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=arm.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; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM3PEPF00009BA1.mail.protection.outlook.com (10.167.16.26) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8207.12 via Frontend Transport; Fri, 29 Nov 2024 03:54:34 +0000 Received: ("Tessian outbound 75f654e2c9bc:v514"); Fri, 29 Nov 2024 03:54:34 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: a60ddedb4f396a4e X-TessianGatewayMetadata: nUIXDfwpcYXSMDpVZiOCkUNobIkDhZ8cq2W3AGJ5anS/Uuf9UCqKVL2GYKDyP+tL6wcJWmco2rTb2V/N4+nWGpxKGMVrRl8LNSZhplUTNpLWIenb904nJZUfmqt5uxMPNALMOqeoL9MJydRN6aqY+D5GD7aNKaSJcVDIgAD6/4g= X-CR-MTA-TID: 64aa7808 Received: from Ld10a3d25d189.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 4877B2AE-1BD3-4534-B4D6-4E19EA93B828.1; Fri, 29 Nov 2024 03:54:28 +0000 Received: from EUR03-DBA-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id Ld10a3d25d189.1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Fri, 29 Nov 2024 03:54:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=VksT7w+zAdHPODfj8veDgifWvXHZNouvJgmNPrph/qNXIvoDY3JpyrBualS3FXOH0i0IWLIuCMBcxsKZIlgVvmcFuVOZzAkQBwX5YxxobkvzvqdjGZAlfyZLsa0F8/U2tpzaBdg26Qujk6sOd+FQRzaJdjhnLKWdeJiM7x+PRQTwUWhMlg/bLNFfyRd2dc+4sD8HgpXbAbHLC2VjhJmh/QZPP5EiHmRgpbup0bBUIlZ5UdyLzkSvwamAtk3vT/kJCsXD12fFYJyJgiW4GCQfH182TO+cFLWmAqeqdGmrkFxIeg49UEA1Cl4AHK7hw54zq/5CTySiNaKn2uFSxiXbng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=NhlydcR664pqFr2/zA64B5qVz7jFQlf9PE1j1txts9A=; b=J1LYvoffa170RTepG5T6MUYa8Kn8Hv5sZqKazIbRHcfnE/qKWH9bdRTdGRgnYuiKYaXDCeKQpRZ7oPtjqRRhsjySCdCIU5wXZzHYY0KcNSd24BenryI8PdN2W011EOMlQjDpgB2pvdOLs4BzGKkX/pXFC+6h2PN1oOfv6N6Vl7RYaOyCiqIq9o0HaitGzncIL/qJQ8FE4qLLNvIigikpyMLqsAed9Ewv08VTZDLYwk9UqVgBDz7z8qmATrq0r7+SwD4PNyG3jAIje4kCJ/PSyLOS8OrzLqkndh+mH1fKBm/efr0zEwGjb0kzBPH0jYbYa/LpJj/Gd4Tz+9fzVYySxw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NhlydcR664pqFr2/zA64B5qVz7jFQlf9PE1j1txts9A=; b=DUcaupmbffETZis+KQHFawbiUw+sidOY0MYfWjd/jZyHp+0yqB8hmqSjfKBhVI5PXc5UQMas5a2g+j2eAhnevMN9yc8hNOjGxK8WymmC4FNXnmjujDlGUTGwr1H243ayPhwFg4DTGB9NmVslHxPOyv4gxBPN7PmSJlVf4r2ekmU= Received: from DU7P190CA0007.EURP190.PROD.OUTLOOK.COM (2603:10a6:10:550::31) by DB9PR08MB8481.eurprd08.prod.outlook.com (2603:10a6:10:3d7::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.13; Fri, 29 Nov 2024 03:54:21 +0000 Received: from DB1PEPF000509FB.eurprd03.prod.outlook.com (2603:10a6:10:550:cafe::ae) by DU7P190CA0007.outlook.office365.com (2603:10a6:10:550::31) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8207.13 via Frontend Transport; Fri, 29 Nov 2024 03:54:21 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by DB1PEPF000509FB.mail.protection.outlook.com (10.167.242.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8207.12 via Frontend Transport; Fri, 29 Nov 2024 03:54:21 +0000 Received: from AZ-NEU-EXJ01.Arm.com (10.240.25.132) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 29 Nov 2024 03:54:19 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EXJ01.Arm.com (10.240.25.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 29 Nov 2024 03:54:18 +0000 Received: from a078660.blr.arm.com (10.162.46.14) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Fri, 29 Nov 2024 03:54:17 +0000 From: Tejas Belagod To: CC: Tejas Belagod , , , , , Subject: [PATCH v3 6/8] aarch64: Add testcase for C/C++ ops on SVE ACLE types. Date: Fri, 29 Nov 2024 09:24:02 +0530 Message-ID: <20241129035404.3363162-7-tejas.belagod@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241129035404.3363162-1-tejas.belagod@arm.com> References: <20241129035404.3363162-1-tejas.belagod@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DB1PEPF000509FB:EE_|DB9PR08MB8481:EE_|AM3PEPF00009BA1:EE_|GV1PR08MB9914:EE_ X-MS-Office365-Filtering-Correlation-Id: abcd8ce9-80a9-4838-600d-08dd102989f2 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|36860700013|82310400026|376014|1800799024; X-Microsoft-Antispam-Message-Info-Original: amV5VoqVNOkdJpzfR9+nELkeoJgiMndcFFTFUk+V8bgOXQW2CzFTiLNKnyNXkJdWUGDBY7n27wYtoCCn/sOHTKHnfrrQcnV+oGSyFuBpOmuc0ATUL57tkMR1L8ArZgWgthLodiN5akK0Y6Qsc/HN1jz+hFOKwLoAVOkwnvUPujKpV2Q5XiVq7VaPT1qQ39Hd6i+S4nI8SuVnV8jdovSGu5YLbo/vWTzHH6Y1H2SQm/eQqX7wUEfg+T24WGstJRSaHxUPBY9iRJdv5W1bGrX2EUfJoBP4n5wkhGgvQLdsnArm/NooFLQcwDkFh1JNbEnunRw0oKwqeh7yn8uAeVdFSZC08LLBtTnebPfw2vxqZsW63yoBCNClXebCYB8vuGgjN/kJt+sYhlmvLAe5/uY6cqRscDDQTfEa87nWx+STkWrAH+omZ2SjppE9tpg4eLhNC4QkMj1ok3chaphgRcCGF5pWWSHXc+qG2t1wOB9HiNiNiSpklkXcDqrR2avyJTic+I74AN1maMXJlYciArhoVO3uyoQ9ySVcKYHUJafBDcdK7FGl3Kvr/pqTwFiEta1NeSVUZwB4v7rJlOErMKUuU2anw/TXED61HFYIHwn0NWtKXywrxfORUW/y0pphSworAJC0XHdhVcYdqpRZr5Xf9vpsHMsNGI1zTOQYJzFK4aHJuWX9k5psA7L941GynTgRM/tXX1OMsS5dEYksv+AdKdbmqmUuD5GRVwZx75eWeh218iHc33PX2wy+mMHtnzjBUH0NOsqwTS5JE4ixlUa6sd2hYD5IBPiTIjZCeCA1ofwidjJE9ASDyYXcgnA2N3IqALSX8EAKKztVu3etN5kiMDi60MtqToUMUyvzNbGI5c/bKgcabekURMsQOm9JR9MmR2Kis7Z8PVk3cplWLdyoRlFz+3GANVZ739M84LXFTc8B7gLWyehx8EpLqGvzuIJIaYy1Vw8WAz/Ef/lgzxt5sPiU0KukUMQ60ug+y5TwlKGefWylT9uCa1k04Gn2udxXp9pisRxxHn+dTs7Vyi0t2itx2rS5Ip8HKlUC6FVDxfbTBDmZcymIJ567xKQd+3enmLzcM3L45Skv1wFs3MKS9fIqZ0IFw7fuFueXurp4dUKHDLlDUsIDHcrfJycARtV4iFNYFJUOuHrnoS7PmerunYLJil4Q/qsO/gwxlZ2pwqfYhgz7klHJQ7Z7yotlHbm9tG4V7MlZK9/OxCe0XtMYDK59bRxPIJ0O5nR8YLZuQPeyvvRpR36xDYOxg/4U9T4+I2IsuC/JRav/wPhPQNu9YQT4gi8oSlWMNMjPm6Lvapj/1uQ+ctTpXss5WWztT4G6j6H6YFj2S+bCThkd2/squg5vB/OtLFas0SGME6J7QLuXgTdYRJlbYWGe9udsNgSy3CfSilT+bhW1WEE+JQ6mCw== X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(36860700013)(82310400026)(376014)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB8481 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:10:550::31]; domain=DU7P190CA0007.EURP190.PROD.OUTLOOK.COM X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM3PEPF00009BA1.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 9c01e3c9-7f03-4f14-2259-08dd102981e3 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|82310400026|36860700013|1800799024|14060799003|35042699022; X-Microsoft-Antispam-Message-Info: dGw/gr9KigQza5QwstXeranmf55gsTTrcMIum3WwaIic1DKBcOpB5xtAaHI/OaGWNqUb2rVjyZip9cuu4LRrl2cak/HwlenhahDDQh3nIcBwj2MDWy2tK0D+JLbA/SEpe26Db3Q9R8KXrlMB5UAMaSJlB7t5/sYdjQUX5c64j2dDEDToPat3rrErD+XNeLosI3SF2sW2JKPrGyDkom66bQZPvlDLXV4ZBV0HXU46/twKqV6qEyzLeeSw7KKxMNLzUNdSfuw/7z3kQ/F50P2RU4ALYgbOX053zXlr1w2AmBlAb57d5XK2htniGbDnZS3aiUBUUhUh/DFvGQ2/YJwH8w6yMegbyzwery5k7zAEMPgbU61bvxvwPgqkuYU11q22mGqF/zpM39AgCDYqjazJDTODj1Rpv9B5mmInqSCzw5hKaK26TwqRwiCM23B9Grj9ZmAXvGPCNXHbiJqTYr/oXjRUc2q0GllqbNjk9pZmHx77kPzJZRzxx9zFQcfzqG4gUunu8r+3n++N9rElNizFTzvf98tgmczjObaBLhnN+TmjHb9DW0LzwinXHHLIA3cntAlcIs1kIfV6b9XR2Ku11Ia6AQGrmcAp6mVXOvCAAtwtUJf0eBkAX5siMxw1Jl5VYvYlkhbKtrJHGJ+YLcZH/IOfLBO1pIOI+C0Hm5Iz20/7BDhDqdocX1d5OSh7Do4Lt3Pk9kf+zE4SM3KF/gzL73BAVmOy3lpVtciGq1a5Hmqrb4omm4CQT4T7Sf8SA0ot6lMnY745A/MJmN1Py5c68i7TM1wF6OMm4uTigPNv2/6K0TbwHTyiPWD84TBT4Kl7VWeqIhxCTYIIqSlft61uRKIz2hoB0nF8TBv/6biIbz6ghzN17qkx8ygNGT+pdUgsNI7+UblW9NMnqt0TKYKDDFyxUKkI4LJKj8QO7tclP3BMfIRNSOA9qpQCopzkqwssI02SraRZvo4pVDBtc8pcj3EQCVP6NVBEXG2wPl7vKrnp9x9O3hQ5KfP1jdt/xKIujMT2YTRZ800OKzRpTAbycBZOX6Ngc6r9ozuDK1pDM0pBODsFVHH1FNfZ2gwtcM7vkuWYVty0mAn5CJRD26JEaJQ90lKKjXHojTnU5MnMjzwPoNqbOweVRF4knO/DJqvqva9Y9amQK9Do8uTYKv6WtxnNCXHoq1/SxKh0WuLtZ7yQwsXI4cLCZuUQU8tsyf7MJrPi3eFAJ4YEOx1lr2Y+BFhxXmVXs7sGb0WQU6AnlzadK0jKtEmyKw86KT/hXj6I8WW7lFAtZBNAj7cVTKpqUbtL5eTDf2wb+qTrVI8WUYsKyAggr46r9cVOrR39Qx0RmAYXLVf3adW/Ued11wNj4upGI0sJicMChxHo9GA0JgA3f2UdxS4AmEvF2+6c9RgjyIjb/SD71SFOGh40/8gIRg== 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:64aa7808-outbound-1.mta.getcheckrecipient.com; CAT:NONE; SFS:(13230040)(376014)(82310400026)(36860700013)(1800799024)(14060799003)(35042699022); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Nov 2024 03:54:34.9763 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: abcd8ce9-80a9-4838-600d-08dd102989f2 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: AM3PEPF00009BA1.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB9914 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, KAM_SHORT, SPF_HELO_PASS, SPF_NONE, TXREP, UNPARSEABLE_RELAY 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~patchwork=sourceware.org@gcc.gnu.org This patch adds a test case to cover C/C++ operators on SVE ACLE types. This does not cover all types, but covers most representative types. gcc/testsuite: * gcc.target/aarch64/sve/acle/general/cops.c: New test. --- .../aarch64/sve/acle/general/cops.c | 579 ++++++++++++++++++ 1 file changed, 579 insertions(+) create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/acle/general/cops.c diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cops.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cops.c new file mode 100644 index 00000000000..f0dc9a9b21c --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cops.c @@ -0,0 +1,579 @@ +/* { dg-do run { target aarch64_sve_hw } } */ +/* { dg-options "-O2" } */ + +#include +#include + +#define DECL_FUNC_UNARY(type, name, op, intr, su, sz, id) \ + __attribute__ ((noipa)) \ + type func_ ## name ## type ## _unary (type a) { \ + return op (a); \ + } \ + void checkfunc_ ## name ## type ## _unary () { \ + type data = svindex_ ## su ## sz (0, 1); \ + type zr = svindex_ ## su ## sz (0, 0); \ + type one = svindex_ ## su ## sz (1, 0); \ + type mone = svindex_ ## su ## sz (-1, 0); \ + svbool_t pg = svptrue_b ## sz (); \ + type exp = intr ## su ## sz ## _z (pg, id, data); \ + type actual = func_ ## name ## type ## _unary (data); \ + svbool_t res = svcmpeq_ ## su ## sz (pg, exp, actual); \ + if (svptest_any (pg, svnot_b_z (pg, res))) \ + __builtin_abort (); \ + } + +#define DECL_FUNC_UNARY_FLOAT(type, name, op, intr, su, sz, id) \ + __attribute__ ((noipa)) \ + type func_ ## name ## type ## _unary (type a) { \ + return op (a); \ + } \ + void checkfunc_ ## name ## type ## _unary () { \ + type data = svdup_n_ ## su ## sz (2.0); \ + type zr = svdup_n_ ## su ## sz (0.0); \ + type one = svdup_n_ ## su ## sz (1.0); \ + type mone = svdup_n_ ## su ## sz (-1.0); \ + svbool_t pg = svptrue_b ## sz (); \ + type exp = intr ## su ## sz ## _z (pg, id, data); \ + type actual = func_ ## name ## type ## _unary (data); \ + svbool_t res = svcmpeq_ ## su ## sz (pg, exp, actual); \ + if (svptest_any (pg, svnot_b_z (pg, res))) \ + __builtin_abort (); \ + } + +#define DECL_FUNC_INDEX(rtype, type, intr, su, sz) \ + __attribute__ ((noipa)) \ + rtype func_ ## rtype ## type ## _vindex (type a, int n) { \ + return (a[n]); \ + } \ + __attribute__ ((noipa)) \ + rtype func_ ## rtype ## type ## _cindex (type a) { \ + return (a[0]); \ + } \ + void checkfunc_ ## rtype ## type ## _vindex () { \ + type a = svindex_ ## su ## sz (0, 1); \ + int n = 2; \ + if (2 != func_ ## rtype ## type ## _vindex (a, n)) \ + __builtin_abort (); \ + } \ + void checkfunc_ ## rtype ## type ## _cindex () { \ + type a = svindex_ ## su ## sz (1, 0); \ + if (1 != func_ ## rtype ## type ## _cindex (a)) \ + __builtin_abort (); \ + } + +#define DECL_FUNC_INDEX_FLOAT(rtype, type, intr, su, sz) \ + __attribute__ ((noipa)) \ + rtype func_ ## rtype ## type ## _vindex (type a, int n) { \ + return (a[n]); \ + } \ + __attribute__ ((noipa)) \ + rtype func_ ## rtype ## type ## _cindex (type a) { \ + return (a[0]); \ + } \ + void checkfunc_ ## rtype ## type ## _vindex () { \ + type a = svdup_n_ ## su ## sz (2.0); \ + int n = 2; \ + if (2.0 != func_ ## rtype ## type ## _vindex (a, n)) \ + __builtin_abort (); \ + } \ + void checkfunc_ ## rtype ## type ## _cindex () { \ + type a = svdup_n_ ## su ## sz (4.0); \ + if (4.0 != func_ ## rtype ## type ## _cindex (a)) \ + __builtin_abort (); \ + } + +#define DECL_FUNC_BINARY(type, name, op, intr, su, sz) \ + __attribute__ ((noipa)) \ + type func_ ## name ## type ## _binary(type a, type b) { \ + return (a) op (b); \ + } \ + void checkfunc_ ## name ## type ## _binary () { \ + type a = svindex_ ## su ## sz (0, 1); \ + type b = svindex_ ## su ## sz (0, 2); \ + svbool_t all_true = svptrue_b ## sz (); \ + type exp = intr ## su ## sz ## _z (all_true, a, b); \ + type actual = func_ ## name ## type ## _binary (a, b); \ + svbool_t res = svcmpeq_ ## su ## sz (all_true, exp, actual); \ + if (svptest_any (all_true, svnot_b_z (all_true, res))) \ + __builtin_abort (); \ + } + +#define DECL_FUNC_BINARY_SHIFT(type, name, op, intr, su, sz) \ + __attribute__ ((noipa)) \ + type func_ ## name ## type ## _binary(type a, type b) { \ + return (a) op (b); \ + } \ + void checkfunc_ ## name ## type ## _binary () { \ + type a = svindex_ ## su ## sz (0, 1); \ + svuint ## sz ## _t b = svindex_u ## sz (0, 2); \ + type c = svindex_ ## su ## sz (0, 2); \ + svbool_t all_true = svptrue_b ## sz (); \ + type exp = intr ## su ## sz ## _z (all_true, a, b); \ + type actual = func_ ## name ## type ## _binary (a, c); \ + svbool_t res = svcmpeq_ ## su ## sz (all_true, exp, actual); \ + if (svptest_any (all_true, svnot_b_z (all_true, res))) \ + __builtin_abort (); \ + } + +#define DECL_FUNC_BINARY_FLOAT(type, name, op, intr, su, sz) \ + __attribute__ ((noipa)) \ + type func_ ## name ## type ## _binary(type a, type b) { \ + return (a) op (b); \ + } \ + void checkfunc_ ## name ## type ## _binary () { \ + type a = svdup_n_ ## su ## sz (1.0); \ + type b = svdup_n_ ## su ## sz (2.0); \ + svbool_t all_true = svptrue_b ## sz (); \ + type exp = intr ## su ## sz ## _z (all_true, a, b); \ + type actual = func_ ## name ## type ## _binary (a, b); \ + svbool_t res = svcmpeq_ ## su ## sz (all_true, exp, actual); \ + if (svptest_any (all_true, svnot_b_z (all_true, res))) \ + __builtin_abort (); \ + } + +#define DECL_FUNC_BINARY_CMP(type, name, op, intr, su, sz) \ + __attribute__ ((noipa)) \ + type func_ ## name ## type ## _binary_cmp(type a, type b) { \ + return (a) op (b); \ + } \ + void checkfunc_ ## name ## type ## _binary_cmp () { \ + type a = svindex_ ## su ## sz (0, 1); \ + type b = svindex_ ## su ## sz (0, 2); \ + type c = func_ ## name ## type ## _binary_cmp (a, b); \ + svbool_t all_true = svptrue_b ## sz (); \ + svbool_t pgc = svcmpne_n_ ## su ## sz (all_true, c, 0); \ + svbool_t pg = intr ## su ## sz (all_true, a, b); \ + svbool_t res = sveor_b_z (all_true, pgc, pg); \ + if (svptest_any (all_true, res)) \ + __builtin_abort (); \ + } + +#define DECL_FUNC_TERNARY(type, su, sz) \ + __attribute__ ((noipa)) \ + type func_ ## type ## _ternary(type p, type q, type a, type b) { \ + return (p >= q) ? a : b; \ + } \ + void checkfunc_ ## type ## _ternary() { \ + type p = svindex_ ## su ## sz (0, 1); \ + type q = svindex_ ## su ## sz (1, 1); \ + type a = svindex_ ## su ## sz (2, 1); \ + type b = svindex_ ## su ## sz (3, 1); \ + svbool_t all_true = svptrue_b ## sz (); \ + svbool_t cmp = svcmpge_ ## su ## sz (all_true, p, q); \ + type res = svsel_ ## su ## sz (cmp, a, b); \ + type actual = func_ ## type ## _ternary(p, q, a, b); \ + svbool_t pgc = svcmpeq_ ## su ## sz (all_true, res, actual); \ + if (svptest_any (all_true, svnot_b_z (all_true, pgc))) \ + __builtin_abort (); \ + } + +#define VECT_CST_s8 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 } +#define VECT_CST_s16 { 0, 1, 2, 3, 4, 5, 6, 7 } +#define VECT_CST_s32 { 0, 1, 2, 3 } +#define VECT_CST_s64 { 0, 1 } + +#define VECT_CSTN_s8 { 0, foo_s8 (), 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 } +#define VECT_CSTN_s16 { 0, foo_s16 (), 2, 3, 4, 5, 6, 7 } +#define VECT_CSTN_s32 { 0, foo_s32 (), 2, 3 } +#define VECT_CSTN_s64 { 0, foo_s64 () } + +#define DECL_FUNC_INIT(type, su, sz, nelem) \ + __attribute__ ((noipa)) \ + type func_ ## type ## _init1() { \ + type temp = VECT_CST_ ## su ## sz; \ + return temp; \ + } \ + __attribute__ ((noipa)) \ + type func_ ## type ## _init2() { \ + type temp = { 0 }; \ + return temp; \ + } \ + __attribute__ ((noipa)) \ + type func_ ## type ## _init3() { \ + type temp = { }; \ + return temp; \ + } \ + __attribute__ ((noipa)) \ + int ## sz ## _t foo_ ## su ## sz () { \ + return 1; \ + } \ + __attribute__ ((noipa)) \ + type func_ ## type ## _init4() { \ + type temp = VECT_CSTN_ ## su ## sz; \ + return temp; \ + } \ + void checkfunc_ ## type ## _init() { \ + svbool_t all_true = svptrue_b ## sz (); \ + int ## sz ## _t mem[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; \ + svbool_t cmp ## sz = svptrue_pat_b ## sz (SV_VL ## nelem); \ + type init1 = svld1_ ## su ## sz (cmp ## sz, mem); \ + type init2 = svindex_ ## su ## sz (0, 0); \ + type init3 = svindex_ ## su ## sz (0, 0); \ + type init4 = svld1_ ## su ## sz (cmp ## sz, mem); \ + \ + type res_init1 = func_ ## type ## _init1 (); \ + svbool_t cmp = svcmpne_ ## su ## sz (all_true, init1, res_init1); \ + if (svptest_any (all_true, cmp)) \ + __builtin_abort (); \ + \ + type res_init2 = func_ ## type ## _init2 (); \ + cmp = svcmpne_ ## su ## sz (all_true, init2, res_init2); \ + if (svptest_any (all_true, cmp)) \ + __builtin_abort (); \ + \ + type res_init3 = func_ ## type ## _init3 (); \ + cmp = svcmpne_ ## su ## sz (all_true, init3, res_init3); \ + if (svptest_any (all_true, cmp)) \ + __builtin_abort (); \ + \ + type res_init4 = func_ ## type ## _init4 (); \ + cmp = svcmpne_ ## su ## sz (all_true, init4, res_init4); \ + if (svptest_any (all_true, cmp)) \ + __builtin_abort (); \ + } + +#define DECL_FUNC_TERNARY_FLOAT(type, su, sz) \ + __attribute__ ((noipa)) \ + type func_ ## type ## _ternary(type p, type q, type a, type b) { \ + return (p >= q) ? a : b; \ + } \ + void checkfunc_ ## type ## _ternary() { \ + type p = svdup_n_ ## su ## sz (2.0); \ + type q = svdup_n_ ## su ## sz (1.0); \ + type a = svdup_n_ ## su ## sz (3.0); \ + type b = svdup_n_ ## su ## sz (4.0); \ + svbool_t all_true = svptrue_b ## sz (); \ + svbool_t cmp = svcmpge_ ## su ## sz (all_true, p, q); \ + type res = svsel_ ## su ## sz (cmp, a, b); \ + type actual = func_ ## type ## _ternary(p, q, a, b); \ + svbool_t pgc = svcmpeq_ ## su ## sz (all_true, res, actual); \ + if (svptest_any (all_true, svnot_b_z (all_true, pgc))) \ + __builtin_abort (); \ + } + +#define DECL_FUNC_BINARY_SCALAR(scalar, type, name, op, intr, su, sz) \ + __attribute__ ((noipa)) \ + type func_ ## name ## type ## _binary_cscalar(type a) { \ + return (a) op scalar; \ + } \ + __attribute__ ((noipa)) \ + type func_ ## name ## type ## _binary_vscalar(type a, int b) { \ + return (a) op b; \ + } \ + void checkfunc_ ## name ## type ## _binary_cscalar () { \ + type a = svindex_ ## su ## sz (0, 1); \ + svbool_t pg = svptrue_b ## sz (); \ + type exp = intr ## su ## sz ## _z (pg, a, scalar); \ + type actual = func_ ## name ## type ## _binary_cscalar (a); \ + svbool_t res = svcmpeq_ ## su ## sz (pg, exp, actual); \ + if (svptest_any (pg, svnot_b_z (pg, res))) \ + __builtin_abort (); \ + } \ + void checkfunc_ ## name ## type ## _binary_vscalar () { \ + type a = svindex_ ## su ## sz (0, 1); \ + svbool_t pg = svptrue_b ## sz (); \ + uint ## sz ## _t b = scalar; \ + type exp = intr ## su ## sz ## _z (pg, a, b); \ + type actual = func_ ## name ## type ## _binary_vscalar (a, b); \ + svbool_t res = svcmpeq_ ## su ## sz (pg, exp, actual); \ + if (svptest_any (pg, svnot_b_z (pg, res))) \ + __builtin_abort (); \ + } + +#define DECL_FUNC_UNARY_RET_FLOAT(rtype, type, name, op, intr, su, sz) \ + __attribute__ ((noipa)) \ + rtype func_ ## name ## rtype ## type ## _unary(type a) { \ + return op (a); \ + } \ + void checkfunc_ ## name ## rtype ## type ## _unary () { \ + type a = svdup_n_ ## su ## sz (2.0); \ + svbool_t pg = svptrue_b ## sz (); \ + rtype exp = intr ## su ## sz ## _z (a); \ + rtype actual = func_ ## name ## type ## _unary (a); \ + svbool_t res = svcmpeq_ ## su ## sz (pg, exp, actual); \ + if (svptest_any (pg, svnot_b_z (pg, res))) \ + __builtin_abort (); \ + } + +#define DECL_FUNC_BINARY_RET_FLOAT_CMP(rtype, type, name, op, intr, su, sz) \ + __attribute__ ((noipa)) \ + rtype func_ ## name ## rtype ## type ## _binary_cmp(type a, type b) { \ + return (a) op (b); \ + } \ + void checkfunc_ ## name ## rtype ## type ## _binary_cmp () { \ + type a = svdup_n_ ## su ## sz (2.0); \ + type b = svdup_n_ ## su ## sz (3.0); \ + svbool_t all_true = svptrue_b ## sz (); \ + rtype cmp = func_ ## name ## rtype ## type ## _binary_cmp (a, b); \ + svbool_t pgc = intr ## su ## sz (all_true, a, b) ; \ + svbool_t pg = svcmpne_n_s ## sz (all_true, cmp, 0); \ + svbool_t res = sveor_b_z (all_true, pg, pgc); \ + if (svptest_any (all_true, res)) \ + __builtin_abort (); \ + } + +#define DECL_FUNC_BINARY_RET_COND(rtype, type, name, op, intr, su, sz) \ + __attribute__ ((noipa)) \ + rtype func_ ## name ## rtype ## type ## _binary_cond(type a, type b) { \ + return (a) op (b); \ + } \ + __attribute__ ((noipa)) \ + svbool_t name ## intr ## su ## sz (svbool_t t, type a, type b) { \ + svbool_t pgl = svcmpne_n_ ## su ## sz (t, a, 0); \ + svbool_t pgr = svcmpne_n_ ## su ## sz (t, b, 0); \ + return intr ## b_z (t, pgl, pgr); \ + } \ + void checkfunc_ ## name ## rtype ## type ## _binary_cond () { \ + type a = svdup_n_ ## su ## sz (2); \ + type b = svdup_n_ ## su ## sz (3); \ + svbool_t all_true = svptrue_b ## sz (); \ + rtype cmp = func_ ## name ## rtype ## type ## _binary_cond (a, b); \ + svbool_t pgc = name ## intr ## su ## sz (all_true, a, b) ; \ + svbool_t pg = svcmpne_n_s ## sz (all_true, cmp, 0); \ + svbool_t res = sveor_b_z (all_true, pg, pgc); \ + if (svptest_any (all_true, res)) \ + __builtin_abort (); \ + } + +#define DECL_FUNC_UNARY_RET_COND(rtype, type, name, op, intr, su, sz) \ + __attribute__ ((noipa)) \ + rtype func_ ## name ## rtype ## type ## _unary_cond (type a) { \ + return op (a); \ + } \ + __attribute__ ((noipa)) \ + svbool_t name ## intr ## su ## sz (svbool_t t, type a) { \ + svbool_t pgl = svcmpeq_n_ ## su ## sz (t, a, 0); \ + return pgl; \ + } \ + void checkfunc_ ## name ## rtype ## type ## _unary_cond () { \ + type a = svdup_n_ ## su ## sz (2); \ + svbool_t all_true = svptrue_b ## sz (); \ + rtype cmp = func_ ## name ## rtype ## type ## _unary_cond (a); \ + svbool_t pgc = name ## intr ## su ## sz (all_true, a) ; \ + svbool_t pg = svcmpne_n_s ## sz (all_true, cmp, 0); \ + svbool_t res = sveor_b_z (all_true, pg, pgc); \ + if (svptest_any (all_true, res)) \ + __builtin_abort (); \ + } + +#define TYPES_UNARY(name, op, intr, id) \ + DECL_FUNC_UNARY (svint8_t, name, op, intr, s, 8, id) \ + DECL_FUNC_UNARY (svint16_t, name, op, intr, s, 16, id) \ + DECL_FUNC_UNARY (svint32_t, name, op, intr, s, 32, id) \ + DECL_FUNC_UNARY (svint64_t, name, op, intr, s, 64, id) \ + DECL_FUNC_UNARY_FLOAT (svfloat32_t, name, op, intr, f, 32, id) \ + DECL_FUNC_UNARY_FLOAT (svfloat64_t, name, op, intr, f, 64, id) + +#define TYPES_INT_UNARY(name, op, intr, id) \ + DECL_FUNC_UNARY (svint8_t, name, op, intr, s, 8, id) \ + DECL_FUNC_UNARY (svint16_t, name, op, intr, s, 16, id) \ + DECL_FUNC_UNARY (svint32_t, name, op, intr, s, 32, id) \ + DECL_FUNC_UNARY (svint64_t, name, op, intr, s, 64, id) + +#define TYPES_BINARY(name, op, intr) \ + DECL_FUNC_BINARY (svint8_t, name, op, intr, s, 8) \ + DECL_FUNC_BINARY (svint16_t, name, op, intr, s, 16) \ + DECL_FUNC_BINARY (svint32_t, name, op, intr, s, 32) \ + DECL_FUNC_BINARY (svint64_t, name, op, intr, s, 64) \ + DECL_FUNC_BINARY_FLOAT (svfloat32_t, name, op, intr, f, 32) \ + DECL_FUNC_BINARY_FLOAT (svfloat64_t, name, op, intr, f, 64) + +#define TYPES_BINARY32_64(name, op, intr) \ + DECL_FUNC_BINARY (svint32_t, name, op, intr, s, 32) \ + DECL_FUNC_BINARY (svint64_t, name, op, intr, s, 64) + +#define TYPES_TERNARY() \ + DECL_FUNC_TERNARY (svint8_t, s, 8) \ + DECL_FUNC_TERNARY (svint16_t, s, 16) \ + DECL_FUNC_TERNARY (svint32_t, s, 32) \ + DECL_FUNC_TERNARY (svint64_t, s, 64) \ + DECL_FUNC_TERNARY_FLOAT (svfloat32_t, f, 32) \ + DECL_FUNC_TERNARY_FLOAT (svfloat64_t, f, 64) + +#define TYPES_INDEX(intr) \ + DECL_FUNC_INDEX (int8_t, svint8_t, intr, s, 8) \ + DECL_FUNC_INDEX (int16_t, svint16_t, intr, s, 16) \ + DECL_FUNC_INDEX (int32_t, svint32_t, intr, s, 32) \ + DECL_FUNC_INDEX (int64_t, svint64_t, intr, s, 64) \ + DECL_FUNC_INDEX_FLOAT (float32_t, svfloat32_t, intr, f, 32) \ + DECL_FUNC_INDEX_FLOAT (float64_t, svfloat64_t, intr, f, 64) + +#define TYPES_INT_BINARY(name, op, intr) \ + DECL_FUNC_BINARY (svint8_t, name, op, intr, s, 8) \ + DECL_FUNC_BINARY (svint16_t, name, op, intr, s, 16) \ + DECL_FUNC_BINARY (svint32_t, name, op, intr, s, 32) \ + DECL_FUNC_BINARY (svint64_t, name, op, intr, s, 64) + +#define TYPES_INT_BINARY_SHIFT(name, op, intr) \ + DECL_FUNC_BINARY_SHIFT (svint8_t, name, op, intr, s, 8) \ + DECL_FUNC_BINARY_SHIFT (svint16_t, name, op, intr, s, 16) \ + DECL_FUNC_BINARY_SHIFT (svint32_t, name, op, intr, s, 32) \ + DECL_FUNC_BINARY_SHIFT (svint64_t, name, op, intr, s, 64) + +#define TYPES_INT_BINARY_CMP(name, op, intr) \ + DECL_FUNC_BINARY_CMP (svint8_t, name, op, intr, s, 8) \ + DECL_FUNC_BINARY_CMP (svint16_t, name, op, intr, s, 16) \ + DECL_FUNC_BINARY_CMP (svint32_t, name, op, intr, s, 32) \ + DECL_FUNC_BINARY_CMP (svint64_t, name, op, intr, s, 64) \ + +#define TYPES_INT_BINARY_SCALAR(c, name, op, intr) \ + DECL_FUNC_BINARY_SCALAR (c, svint8_t, name, op, intr, s, 8) \ + DECL_FUNC_BINARY_SCALAR (c, svint16_t, name, op, intr, s, 16) \ + DECL_FUNC_BINARY_SCALAR (c, svint32_t, name, op, intr, s, 32) \ + DECL_FUNC_BINARY_SCALAR (c, svint64_t, name, op, intr, s, 64) + +#define TYPES_FLOAT_BINARY_RET_CMP(name, op, intr) \ + DECL_FUNC_BINARY_RET_FLOAT_CMP (svint32_t, svfloat32_t, name, op, intr, f, 32) \ + DECL_FUNC_BINARY_RET_FLOAT_CMP (svint64_t, svfloat64_t, name, op, intr, f, 64) + +#define TYPES_FLOAT_UNARY_RET(name, op, intr) \ + DECL_FUNC_UNARY_RET_FLOAT (svint32_t, svfloat32_t, name, op, intr, f, 32) \ + DECL_FUNC_UNARY_RET_FLOAT (svint64_t, svfloat64_t, name, op, intr, f, 64) + +#define TYPES_BINARY_RET_COND(name, op, intr) \ + DECL_FUNC_BINARY_RET_COND (svint8_t, svint8_t, name, op, intr, s, 8) \ + DECL_FUNC_BINARY_RET_COND (svint16_t, svint16_t, name, op, intr, s, 16) \ + DECL_FUNC_BINARY_RET_COND (svint32_t, svint32_t, name, op, intr, s, 32) \ + DECL_FUNC_BINARY_RET_COND (svint64_t, svint64_t, name, op, intr, s, 64) \ + DECL_FUNC_BINARY_RET_COND (svint32_t, svfloat32_t, name, op, intr, f, 32) \ + DECL_FUNC_BINARY_RET_COND (svint64_t, svfloat64_t, name, op, intr, f, 64) + +#define TYPES_UNARY_RET_COND(name, op, intr) \ + DECL_FUNC_UNARY_RET_COND (svint8_t, svint8_t, name, op, intr, s, 8) \ + DECL_FUNC_UNARY_RET_COND (svint16_t, svint16_t, name, op, intr, s, 16) \ + DECL_FUNC_UNARY_RET_COND (svint32_t, svint32_t, name, op, intr, s, 32) \ + DECL_FUNC_UNARY_RET_COND (svint64_t, svint64_t, name, op, intr, s, 64) \ + DECL_FUNC_UNARY_RET_COND (svint32_t, svfloat32_t, name, op, intr, f, 32) \ + DECL_FUNC_UNARY_RET_COND (svint64_t, svfloat64_t, name, op, intr, f, 64) + +#define TYPES_INIT() \ + DECL_FUNC_INIT (svint8_t, s, 8, 16) \ + DECL_FUNC_INIT (svint16_t, s, 16, 8) \ + DECL_FUNC_INIT (svint32_t, s, 32, 4) \ + DECL_FUNC_INIT (svint64_t, s, 64, 2) + +#define C_TYPES \ + TYPES_INIT () \ + TYPES_UNARY (plus, +, svadd_, zr) \ + TYPES_UNARY (minus, -, svsub_, zr) \ + TYPES_UNARY (plus_plus, ++, svadd_, one) \ + TYPES_UNARY (minus_minus, --, svadd_, mone) \ + TYPES_INDEX (svget_lane_) \ + TYPES_BINARY (plus, +, svadd_) \ + TYPES_BINARY (minus, -, svsub_) \ + TYPES_BINARY (mult, *, svmul_) \ + TYPES_BINARY32_64 (div, /, svdiv_) \ + TYPES_INT_BINARY (and, &, svand_) \ + TYPES_INT_BINARY (orr, |, svorr_) \ + TYPES_INT_UNARY (not, ~, sveor_, mone) \ + TYPES_INT_BINARY (eor, ^, sveor_) \ + TYPES_INT_BINARY_SHIFT (lshift, <<, svlsl_) \ + TYPES_INT_BINARY_SHIFT (rshift, >>, svasr_) \ + TYPES_INT_BINARY_SCALAR (2, lshift, <<, svlsl_n_) \ + TYPES_INT_BINARY_SCALAR (2, rshift, >>, svasr_n_) \ + TYPES_INT_BINARY_CMP (eq, ==, svcmpeq_) \ + TYPES_INT_BINARY_CMP (ne, !=, svcmpne_) \ + TYPES_INT_BINARY_CMP (gt, >, svcmpgt_) \ + TYPES_INT_BINARY_CMP (lt, <, svcmplt_) \ + TYPES_INT_BINARY_CMP (ge, >=, svcmpge_) \ + TYPES_INT_BINARY_CMP (le, <=, svcmple_) \ + TYPES_FLOAT_BINARY_RET_CMP (eq, ==, svcmpeq_) \ + TYPES_FLOAT_BINARY_RET_CMP (ne, !=, svcmpne_) \ + TYPES_FLOAT_BINARY_RET_CMP (gt, >, svcmpgt_) \ + TYPES_FLOAT_BINARY_RET_CMP (lt, <, svcmplt_) \ + TYPES_FLOAT_BINARY_RET_CMP (ge, >=, svcmpge_) \ + TYPES_FLOAT_BINARY_RET_CMP (le, <=, svcmple_) \ + +#ifdef __cplusplus +#define CPP_TYPES \ + TYPES_BINARY_RET_COND (and_and, &&, svand_) \ + TYPES_BINARY_RET_COND (or_or, ||, svorr_) \ + TYPES_UNARY_RET_COND (lnot, !, svnot_z_) \ + TYPES_TERNARY () +#endif + +/* Declare and define functions. */ +C_TYPES + +#ifdef __cplusplus +CPP_TYPES +#endif + +#undef DECL_FUNC_UNARY +#define DECL_FUNC_UNARY(type, name, op, intr, su, sz, id) \ + checkfunc_ ## name ## type ## _unary (); + +#undef DECL_FUNC_UNARY_FLOAT +#define DECL_FUNC_UNARY_FLOAT(type, name, op, intr, su, sz, id) \ + checkfunc_ ## name ## type ## _unary (); + +#undef DECL_FUNC_UNARY_RET_FLOAT +#define DECL_FUNC_UNARY_RET_FLOAT(type, name, op, intr, su, sz, id) \ + checkfunc_ ## name ## type ## _unary (); + +#undef DECL_FUNC_INDEX +#define DECL_FUNC_INDEX(rtype, type, intr, su, sz) \ + checkfunc_ ## rtype ## type ## _vindex (); \ + checkfunc_ ## rtype ## type ## _cindex (); + +#undef DECL_FUNC_INDEX_FLOAT +#define DECL_FUNC_INDEX_FLOAT(rtype, type, intr, su, sz) \ + checkfunc_ ## rtype ## type ## _vindex (); \ + checkfunc_ ## rtype ## type ## _cindex (); + +#undef DECL_FUNC_BINARY +#define DECL_FUNC_BINARY(type, name, op, intr, su, sz) \ + checkfunc_ ## name ## type ## _binary (); + +#undef DECL_FUNC_BINARY_SHIFT +#define DECL_FUNC_BINARY_SHIFT(type, name, op, intr, su, sz) \ + checkfunc_ ## name ## type ## _binary (); + +#undef DECL_FUNC_BINARY_FLOAT +#define DECL_FUNC_BINARY_FLOAT(type, name, op, intr, su, sz) \ + checkfunc_ ## name ## type ## _binary (); + +#undef DECL_FUNC_BINARY_CMP +#define DECL_FUNC_BINARY_CMP(type, name, op, intr, su, sz) \ + checkfunc_ ## name ## type ## _binary_cmp (); + +#undef DECL_FUNC_TERNARY +#define DECL_FUNC_TERNARY(type, su, sz) \ + checkfunc_ ## type ## _ternary (); + +#undef DECL_FUNC_INIT +#define DECL_FUNC_INIT(type, su, sz, nelem) \ + checkfunc_ ## type ## _init (); + +#undef DECL_FUNC_TERNARY_FLOAT +#define DECL_FUNC_TERNARY_FLOAT(type, su, sz) \ + checkfunc_ ## type ## _ternary (); + +#undef DECL_FUNC_BINARY_SCALAR +#define DECL_FUNC_BINARY_SCALAR(scalar, type, name, op, intr, su, sz) \ + checkfunc_ ## name ## type ## _binary_cscalar (); \ + checkfunc_ ## name ## type ## _binary_vscalar (); + +#undef DECL_FUNC_BINARY_RET_FLOAT_CMP +#define DECL_FUNC_BINARY_RET_FLOAT_CMP(rtype, type, name, op, intr, su, sz) \ + checkfunc_ ## name ## rtype ## type ## _binary_cmp (); + +#undef DECL_FUNC_BINARY_RET_COND +#define DECL_FUNC_BINARY_RET_COND(rtype, type, name, op, intr, su, sz) \ + checkfunc_ ## name ## rtype ## type ## _binary_cond (); + +#undef DECL_FUNC_UNARY_RET_COND +#define DECL_FUNC_UNARY_RET_COND(rtype, type, name, op, intr, su, sz) \ + checkfunc_ ## name ## rtype ## type ## _unary_cond (); + +int +main (void) +{ + C_TYPES + +#ifdef __cplusplus + CPP_TYPES +#endif + + return 0; +} From patchwork Fri Nov 29 03:54:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejas Belagod X-Patchwork-Id: 102066 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 7F2843858CDA for ; Fri, 29 Nov 2024 04:02:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7F2843858CDA Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=mX4+Dzs8; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=mX4+Dzs8 X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazlp170100000.outbound.protection.outlook.com [IPv6:2a01:111:f403:c201::]) by sourceware.org (Postfix) with ESMTPS id B57583858D28 for ; Fri, 29 Nov 2024 03:54:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B57583858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B57583858D28 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:c201:: ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1732852494; cv=pass; b=MqfdCoaPcM8P6uq1GHojF/CKsZ2dd12q+Ey/g+CoAt48cmjUpsT2bb92yuGdmc399XtuGTkj9vperIp+UfiVT4krBlaai+ELJcyueO/WJ8q7knSJZ1WeEd12GfuKwKNhi8L39verF0M8rs1LjkLt121SJfDUP4/BqyFlCxbSHu0= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1732852494; c=relaxed/simple; bh=GQzu67IulIs5CEL1eq1L/oZX2HXuVCRdKEEktsx8G/U=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=bDElBub6KlgQGMSCFtTb8ojN1a17YAzO7R2jr9vAevEMuWvcED4iZwk+/ezlPXpxTe8ZI1EWhNJ7zaQLCzfLrS4R8yqi0ia5X4KUT23o05QTXd5mlGY/us4N1udE4YyaknH4KWX/orWIRBkm3o4YsGlTLEbryA9VbfVrVoBSDHk= ARC-Authentication-Results: i=3; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B57583858D28 ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=HTM02d66H+e+xNDBC9ZEYyhk+Eg6FZ7ctP4CKf7BYFF9E45R3Il6ccu/J9D/jWKe0BZte28XGvw1Bts/LGsWj2VbssxDQkp4YZiU8023qWt5JW48rCiiNqJWLrr4FryDYdAmHk6DN4+BEaTOh34XRqbDORSyzEf7ov4S7HKlmqpfxoyUH73MYFKWyY8KDCUvM5KxdDkNcMWZrYg1HPxkoNmBxuykgo/mqOfsh4/iQaSpB3cPztOG3pWQ7OYLEanD3t2iv3xdFw1mZSYybRKyk6rnsbRd7GiAgNE1QF9b2hEzwGdmm253NMCQ9Ry4o5xx+COjdRi/fi8LSatXDJ+OGQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=N6aGrzii+IXDfJyQXCONqLFnGkc4IZbgVqVYMlHN3X4=; b=iDUMotMrzflhT5h1xoKVUjrOXZmKQOCe+8emwWhReDobTc51ymyYBIpR7EleVo42ThPTXOtGtOtwbHjgWdXuH4feT7y7byakawrDeQ9auXDXu0bzYglkmtDI3oTPPG0hFHT9gq8s3CqHXsS3uCD+vsj38UXKRG1/OWhvHbIid7zTrGFLzdkgnLrba3utDg6nTnMGLCNOpuWhu9Cpl3W3DioeXymZh4w843BzHEoNhPO5RoAEe84m4yU4QzqB3li/0xYqkBUdPG6romBuZ2argTQNK0rasjtekkaSVluT73a59fi/bAHHZ9xPfdhdOLSrooaBleVSjWw4xZo+QWirhg== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=N6aGrzii+IXDfJyQXCONqLFnGkc4IZbgVqVYMlHN3X4=; b=mX4+Dzs89ZLuyffKk4IB4bFZ0Aq9dyXzF8XNyO7FPcAkHqS7erbMjhIQHJ+39hsMVU03+/DOCjLsrTAUSDGZCKe/ZsZbqla4cCOZV812agHKAOZnKwop9BoUr+j3/RsjAJCWNM8SATGC5M3Iw4GkP5IKQXLCSzr7ADeXxQz1qbw= Received: from DB9PR06CA0020.eurprd06.prod.outlook.com (2603:10a6:10:1db::25) by DB5PR08MB10164.eurprd08.prod.outlook.com (2603:10a6:10:4a1::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.14; Fri, 29 Nov 2024 03:54:43 +0000 Received: from DB1PEPF000509F0.eurprd03.prod.outlook.com (2603:10a6:10:1db:cafe::14) by DB9PR06CA0020.outlook.office365.com (2603:10a6:10:1db::25) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8207.14 via Frontend Transport; Fri, 29 Nov 2024 03:54:43 +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=arm.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; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB1PEPF000509F0.mail.protection.outlook.com (10.167.242.74) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8207.12 via Frontend Transport; Fri, 29 Nov 2024 03:54:42 +0000 Received: ("Tessian outbound 3b1f0cd68b0e:v514"); Fri, 29 Nov 2024 03:54:42 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 7c007ac83d143cc2 X-TessianGatewayMetadata: Jw+wY15sJDIFrk1A3qyVBLO4Fx64ScuO/BYw8JsqqCqjcqe5kqD0RwI6upR99ABVzUprjeJ8bA20iXpWI2daPXgu6xWF3knSfqT1JGCFSe5wXJqOr/U/b1Ww9+djERGOJiMPmhaWYtaItOatIR7QPhSyKTREcFEU/EhMQNngLO8= X-CR-MTA-TID: 64aa7808 Received: from L5a4dd1721be9.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 4E9802C1-2116-40D4-8334-8A3E65480DE8.1; Fri, 29 Nov 2024 03:54:35 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id L5a4dd1721be9.1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Fri, 29 Nov 2024 03:54:35 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=cO0W7QGVunsdCZfEPyfaTcZ6vBdUtLyUP+oLAWEDWrGWjuDWC72uzo9xjejCuuN4+a8gNsTgZRIiFz8uxxbB7BpSgOB+n1EZwupJlSS/nzPvLVn9xhgBSOFhZZ66g1Xpt6+8n3IsuHkooF5/VET1/H9OP5a8SANXTsBePvmqLdJiOCZTPNrLXpFlc5Lpx/VKR6tHA8DQsF2D2rJSUBRzZ/h1+FJ7QFO/7n+eL0ND+JIQpFkMT8gOOhKSkANYLDiKEfBvramvDnLgPLVTg+gounIAVsJuy7E2fYBl1JuM7+U+WznNpqwJRdIpmhwBtdCjkio0QZ7OFKGZXEiJSs4jXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=N6aGrzii+IXDfJyQXCONqLFnGkc4IZbgVqVYMlHN3X4=; b=juJz7R4itlpjBQjjrDEdEwDTe1GS26Hcg8nynDVvUzhHQqYX2CmawRm6xA4pDOiAm/qqnG4ASHwdNMkgYi+FyncGqtnjy87J8ab9IV+6VSZuIcXG5fDwrPd3G5JX6HtKCcJhXjwo7Wfpw1MyjgNViNMfkN+XM+P6Qztn2iHnjtr2jAD8hMEwDxlO1iuRXTAOxZTbvUnucoFmU6CwTGwNyOjwKd+HA3XMqkAWSnLJPSh3MBGNGItNLO8JVN5LrHNvjIKEhptiPOSZaWGuX5Cn4A8F4Z9hHTWQks5KODmHsaYQh/4xRld3ZPzm4jVWO5brXzVSIlxtS0l9MmASJI+Eag== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=N6aGrzii+IXDfJyQXCONqLFnGkc4IZbgVqVYMlHN3X4=; b=mX4+Dzs89ZLuyffKk4IB4bFZ0Aq9dyXzF8XNyO7FPcAkHqS7erbMjhIQHJ+39hsMVU03+/DOCjLsrTAUSDGZCKe/ZsZbqla4cCOZV812agHKAOZnKwop9BoUr+j3/RsjAJCWNM8SATGC5M3Iw4GkP5IKQXLCSzr7ADeXxQz1qbw= Received: from DUZPR01CA0156.eurprd01.prod.exchangelabs.com (2603:10a6:10:4bd::19) by DU0PR08MB9752.eurprd08.prod.outlook.com (2603:10a6:10:444::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.13; Fri, 29 Nov 2024 03:54:23 +0000 Received: from DB1PEPF00050A01.eurprd03.prod.outlook.com (2603:10a6:10:4bd:cafe::50) by DUZPR01CA0156.outlook.office365.com (2603:10a6:10:4bd::19) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8207.13 via Frontend Transport; Fri, 29 Nov 2024 03:54:23 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by DB1PEPF00050A01.mail.protection.outlook.com (10.167.242.43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8207.12 via Frontend Transport; Fri, 29 Nov 2024 03:54:23 +0000 Received: from AZ-NEU-EX06.Arm.com (10.240.25.134) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 29 Nov 2024 03:54:22 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX06.Arm.com (10.240.25.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 29 Nov 2024 03:54:20 +0000 Received: from a078660.blr.arm.com (10.162.46.14) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Fri, 29 Nov 2024 03:54:19 +0000 From: Tejas Belagod To: CC: Tejas Belagod , , , , , Subject: [PATCH v3 7/8] aarch64: Update SVE ACLE tests Date: Fri, 29 Nov 2024 09:24:03 +0530 Message-ID: <20241129035404.3363162-8-tejas.belagod@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241129035404.3363162-1-tejas.belagod@arm.com> References: <20241129035404.3363162-1-tejas.belagod@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DB1PEPF00050A01:EE_|DU0PR08MB9752:EE_|DB1PEPF000509F0:EE_|DB5PR08MB10164:EE_ X-MS-Office365-Filtering-Correlation-Id: 3bb768af-bbf2-4645-3139-08dd10298ea1 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|82310400026|36860700013|376014|1800799024; X-Microsoft-Antispam-Message-Info-Original: kyX1n4McnC8hxNWGddT9Lferrf1goXjOyJPl/nN0vKzCmZFXcsBXoxtkKhpHB1CxiXTVXrNpac61/Ft4JvIRddwFqoFGJJfk1zBqzYBhC0Uiny29fcS0K4v/pOBHHR1Azz0PGckWUjrKJC+NjhMFvAilOGEcbxWmYXznTt3VL0TDHOK5Llu5YUaACOnZ/e8NBmo1XoqTB6pqsnDtLMk/6KGyUpNAJAy8AcjdXNE/82e7SmMxcte0cJfEVFa70rjpgd+oKEelZ17EZLolToDOQTRt1cNzYcCQHLARTxRh8RNGOAELZHhr8tsEcbxkEpjqf8aobchfvipvY3SayxcFIzEbDNOtnyoZvrOhhjTYrZS1ibXWpLgFcYFlW3m8nDLfdJDpHg/PSAIth+BTSIj4TdYtJbAEex3w0XckYovcnzrGGQD1kgJ8G1EX55s1IYiIc118Xo4x0S6OIUYmIYUm76MGIAv0T+blez5BGP071wbMamIOynvynLim2kicz/7QeZdkXeL/6UX00c//NF8oHF44fY/xiSKIQnyEGkVfiXER1dYGO/cSVEp9XYkG25uagTCQ+xvYrmIFdic3Yb0IMVm3S3jatpgMAtTslypl+d+RE5eqe2qrmSlh+0Oc5/E/DRKe8Oo++rr8JfeXEQhxa/6i+Q8ZLA/Hc4lYOCkfnZE6YWXm+rWnZZ3wJ4xzX+f4wM8bx11wb4qP5YJU7nHp3Ylmoq+4K7iViwtjnbe4QUS9WTGmYoCwhs5wTxSBoJExu2dA8eqHe8rIBxXx4/Gt8EIOycuVR3HB9ls9ovYFYBbFa8rZ1mM1i0i7eaDV7deNwb37Qb+O9WlEq9hGmUmGXs6dlsDd46HHNZE8S801AA/HRBLkAijLvd/y+Fwn9mxfkXJGqWFuToDN0kdy/R1qkpowbYsU2C0EF7VQESHILmvUhLxoxpLBnFe/CA0Go6+UzO3zq17IYz7hoAbDaDqP4GJ80kXxdPajUtBPG1ivmGSKQwcng3i0YNRdUWtNTXVbz8CZd/mg59DQLMxsQNNcEI89tXON/8BGFteW+TJG0UiCP40Zb5QTpllK0G5OWdauyFD5Q9GlLWDPTtj+jP5GezlS2rCYZWAxwhsjvSHjqRSO+pfSwc+FZaireMUEcjYAk0kLvubRG7g6AGaxuaI3xp23ZxpHfpxUIY8dRVAYoysJ2vi5q+A2wCCrH1vH3aqOPn7awyZaJNKkk7TRzhkHVU8ySWclccNVIW1Q4b3eUNylb+q7vWmo7yHP0aQVNOQ1pzZOyjE0cXhMKiJwacJbnJ04ykohzMnoK5zt6ZdpsWcQCVeQq+jgB07JL0/26Am99WQ3FS//wqmejMRMzLKPVSfCudjPt+sS6AOwCSKfDB8P2ik/juleZe/qMsMmJG2WZ/dFncgW7+aInJ0NWkDdOA== X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(82310400026)(36860700013)(376014)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB9752 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:10:4bd::19]; domain=DUZPR01CA0156.eurprd01.prod.exchangelabs.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB1PEPF000509F0.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: c79181a4-cbfa-4599-878d-08dd10298307 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|35042699022|1800799024|82310400026|14060799003|376014; X-Microsoft-Antispam-Message-Info: 2XYfRGPxc4nhTRPsyLS7NSHdDnfy5DMBky7v9tTwTcgWeIX9PGnKeYgtsCborKQemwkHUa6J7kK5/PTDSMjclVE+FouUgBfluGB8DPo6xj5wZYf1Q8bZM4DB2FuLeSal/gRwGi4PaGC/+GuVJJSp8ueVEgCZyERtGi4Y34hPMtFlZiee+Y6OlNGVEXObk03w5txKIjIRMauZwSRKaQo1spXRbI58YZq/Qsmze1ckznOpOfwDl5/OM/r+6po3srBZePNeYjvICQ3AC0JuuqkG9uI9Ne4iZX2tNSgwfHGaYQojyfitBXeDQ2Pp8H3HUZlAZgYZpPrYjNT97XaNQn8SHLoVELnUiRMvySxHMVoAyiZf0q8ELjRS/DNqh0F4D60fg2vBUJATOhF2fycObJ3TuzZ4/iZUJ/SBDqic85LAsEL4pYZPxipJPcJoA8eXKAERlCC1H9hlD86LLEsCedDccbGxNF6d7imQBFoYqIWONmT8rdelMJy3/gWswDxrQ0vOxcpjTai+/kRqWuyNDaeBBDD5HoKYR9CpOzWdJIgOlfniMNlHlj2c8ug0xs3my3UT7VWZEHxc6FQZz2kATi4WMC32WGVw2RvhNjw0eYBtg2OiwiHVXc0Hpe97Ujz4aVuV3HxSwpEG3CqvEaabA019k0rFTkjMS6PzB4PY8vjdiZM86DJX8UWt1+RTq9zpq+H0FoDLz9LH1nX+ahaojuw6qugEaoduURg8DDlH5AgIp/b1GkPxhs4/mdi//YSPGbZIJvvloJzFJNO82ybCs8bTpfYsIYQMEFZdlQhxUotUVVLoSGCErW3u7RKeVjOEmoUgTcORHcNh3FARHYFMSPwHmbO40IuEFeltd8My6nGOS5GCx/0BIoKMqCVF1z77rQUAkCeiHMOwULmFESxLFs1dMaDtozn37HKLwy7L/j7gP95TxTK7dO6YtoH1Yb/+YZ0rpMMLlnTeiaQ5t4u/tOsFrjijR8EgVjMtz1+eRxVJ0BUcWNFJjX5PUO8UK/akeq+/UaTBllL+/5LL3tOLdwUyaFwUpOu30WqrwsYCi3BZZH1J7YINbmv+d93QQ4ukSWcoK790oX0qtR47xLNFeCL+29c8JEo7jnukjIEijf3SDtQEj75JJ/zfL5XcR+uo5B96oiatr7Sr+hwY/t6wDspMd2Dj8ahwUHfEfUT48DEQbSPKmA8tz/96XypYzKTz2AIN5LeYFt//FH2RQfdGyc/HLu8EbVqfdhaTmDQzqv5u17ILsTZBg0GKD7b+ZUFW6FDqhJMaMICzoEoxayKAh9OmX8Yre9oArbRj0XF2Y5Rmu0DVlOM6eyEqoUPyUe0NW68SdpwEdN4wvakoC92n2qu/IaCRVaDfEKLlzlWKIfBVfRmjFspSnI87bHVjebVb+3lEms/xQGifiYMS/5rz2rvqug== 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:64aa7808-outbound-1.mta.getcheckrecipient.com; CAT:NONE; SFS:(13230040)(36860700013)(35042699022)(1800799024)(82310400026)(14060799003)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Nov 2024 03:54:42.9110 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3bb768af-bbf2-4645-3139-08dd10298ea1 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: DB1PEPF000509F0.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR08MB10164 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NONE, TXREP, UNPARSEABLE_RELAY 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~patchwork=sourceware.org@gcc.gnu.org This patch updates existing SVE ACLE tests to expect new behaviour wrt SVE ACLE types, GNU vectors and C/C++ operations. testsuite/ChangeLog: * gcc.target/aarch64/sve/acle/general-c/gnu_vectors_1.c: Update test. * gcc.target/aarch64/sve/acle/general-c/gnu_vectors_2.c: Likewise. * gcc.target/aarch64/sve/acle/general-c/sizeless-1.c: Likewise. * gcc.target/aarch64/sve/acle/general-c/sizeless-2.c: Likewise. * gcc.target/aarch64/sve/acle/general/attributes_7.c: Likewise. * g++.target/aarch64/sve/acle/general-c++/gnu_vectors_1.C: Likewise. * g++.target/aarch64/sve/acle/general-c++/gnu_vectors_2.C: Likewise. --- .../sve/acle/general-c++/gnu_vectors_1.C | 438 +++++++++--------- .../sve/acle/general-c++/gnu_vectors_2.C | 434 ++++++++--------- .../sve/acle/general-c/gnu_vectors_1.c | 349 +++++++------- .../sve/acle/general-c/gnu_vectors_2.c | 346 +++++++------- .../aarch64/sve/acle/general-c/sizeless-1.c | 2 +- .../aarch64/sve/acle/general-c/sizeless-2.c | 2 +- .../aarch64/sve/acle/general/attributes_7.c | 30 +- 7 files changed, 801 insertions(+), 800 deletions(-) diff --git a/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/gnu_vectors_1.C b/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/gnu_vectors_1.C index f60ffe4a262..49b90492ce1 100644 --- a/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/gnu_vectors_1.C +++ b/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/gnu_vectors_1.C @@ -14,20 +14,20 @@ f (svuint8_t sve_u1, svint8_t sve_s1, svuint8_t init_sve_u1 = 0; // { dg-error {cannot convert 'int' to 'svuint8_t' in initialization} } svuint8_t init_sve_u2 = {}; svuint8_t init_sve_u3 = { sve_u1 }; - svuint8_t init_sve_u4 = { gnu_u1 }; - svuint8_t init_sve_u5 = { sve_s1 }; // { dg-error {cannot convert 'svint8_t' to 'svuint8_t' in initialization} } - svuint8_t init_sve_u6 = { gnu_s1 }; // { dg-error {cannot convert 'gnu_int8_t'[^\n]* to 'svuint8_t' in initialization} } - svuint8_t init_sve_u7 = { 0 }; // { dg-error {cannot convert 'int' to 'svuint8_t' in initialization} } - svuint8_t init_sve_u8 = { sve_u1, sve_u1 }; // { dg-error {too many initializers for 'svuint8_t'} } - svuint8_t init_sve_u9 = { gnu_u1, gnu_u1 }; // { dg-error {too many initializers for 'svuint8_t'} } + svuint8_t init_sve_u4 = { gnu_u1 }; // { dg-error {cannot convert 'gnu_uint8_t'[^\n]* to 'unsigned char' in initialization} } + svuint8_t init_sve_u5 = { sve_s1 }; // { dg-error {cannot convert 'svint8_t' to 'unsigned char' in initialization} } + svuint8_t init_sve_u6 = { gnu_s1 }; // { dg-error {cannot convert 'gnu_int8_t'[^\n]* to 'unsigned char' in initialization} } + svuint8_t init_sve_u7 = { 0 }; + svuint8_t init_sve_u8 = { sve_u1, sve_u1 }; // { dg-error {cannot convert 'svuint8_t' to 'unsigned char' in initialization} } + svuint8_t init_sve_u9 = { gnu_u1, gnu_u1 }; // { dg-error {cannot convert 'gnu_uint8_t'[^\n]* to 'unsigned char' in initialization} } svuint8_t init_sve_u10 {}; svuint8_t init_sve_u11 { sve_u1 }; - svuint8_t init_sve_u12 { gnu_u1 }; - svuint8_t init_sve_u13 { sve_s1 }; // { dg-error {cannot convert 'svint8_t' to 'svuint8_t' in initialization} } - svuint8_t init_sve_u14 { gnu_s1 }; // { dg-error {cannot convert 'gnu_int8_t'[^\n]* to 'svuint8_t' in initialization} } - svuint8_t init_sve_u15 { 0 }; // { dg-error {cannot convert 'int' to 'svuint8_t' in initialization} } - svuint8_t init_sve_u16 { sve_u1, sve_u1 }; // { dg-error {too many initializers for 'svuint8_t'} } - svuint8_t init_sve_u17 { gnu_u1, gnu_u1 }; // { dg-error {too many initializers for 'svuint8_t'} } + svuint8_t init_sve_u12 { gnu_u1 }; // { dg-error {cannot convert 'gnu_uint8_t'[^\n]* to 'unsigned char' in initialization} } + svuint8_t init_sve_u13 { sve_s1 }; // { dg-error {cannot convert 'svint8_t' to 'unsigned char' in initialization} } + svuint8_t init_sve_u14 { gnu_s1 }; // { dg-error {cannot convert 'gnu_int8_t'[^\n]* to 'unsigned char' in initialization} } + svuint8_t init_sve_u15 { 0 }; + svuint8_t init_sve_u16 { sve_u1, sve_u1 }; // { dg-error {cannot convert 'svuint8_t' to 'unsigned char' in initialization} } + svuint8_t init_sve_u17 { gnu_u1, gnu_u1 }; // { dg-error {cannot convert 'gnu_uint8_t'[^\n]* to 'unsigned char' in initialization} } svuint8_t init_sve_u18 (0); // { dg-error {cannot convert 'int' to 'svuint8_t' in initialization} } svuint8_t init_sve_u19 (sve_u1); svuint8_t init_sve_u20 (gnu_u1); @@ -59,13 +59,13 @@ f (svuint8_t sve_u1, svint8_t sve_s1, // Compound literals (svuint8_t) {}; - (svuint8_t) { 0 }; // { dg-error {cannot convert 'int' to 'svuint8_t' in initialization} } + (svuint8_t) { 0 }; (svuint8_t) { sve_u1 }; - (svuint8_t) { gnu_u1 }; - (svuint8_t) { sve_s1 }; // { dg-error {cannot convert 'svint8_t' to 'svuint8_t' in initialization} } - (svuint8_t) { gnu_s1 }; // { dg-error {cannot convert 'gnu_int8_t'[^\n]* to 'svuint8_t' in initialization} } - (svuint8_t) { sve_u1, sve_u1 }; // { dg-error {too many initializers for 'svuint8_t'} } - (svuint8_t) { gnu_u1, gnu_u1 }; // { dg-error {too many initializers for 'svuint8_t'} } + (svuint8_t) { gnu_u1 }; // { dg-error {cannot convert 'gnu_uint8_t'[^\n]* to 'unsigned char' in initialization} } + (svuint8_t) { sve_s1 }; // { dg-error {cannot convert 'svint8_t' to 'unsigned char' in initialization} } + (svuint8_t) { gnu_s1 }; // { dg-error {cannot convert 'gnu_int8_t'[^\n]* to 'unsigned char' in initialization} } + (svuint8_t) { sve_u1, sve_u1 }; // { dg-error {cannot convert 'svuint8_t' to 'unsigned char' in initialization} } + (svuint8_t) { gnu_u1, gnu_u1 }; // { dg-error {cannot convert 'gnu_uint8_t'[^\n]* to 'unsigned char' in initialization} } (gnu_uint8_t) {}; (gnu_uint8_t) { 0 }; @@ -93,14 +93,14 @@ f (svuint8_t sve_u1, svint8_t sve_s1, // Casts (void) sve_u1; - (int) sve_u1; // { dg-error {invalid cast from type 'svuint8_t' to type 'int'} } - (bool) sve_u1; // { dg-error {invalid cast from type 'svuint8_t' to type 'bool'} } - (svuint8_t) 0; // { dg-error {invalid cast from type 'int' to type 'svuint8_t'} } - (svuint8_t) n; // { dg-error {invalid cast from type 'int' to type 'svuint8_t'} } + (int) sve_u1; // { dg-error {cannot convert a vector of type 'svuint8_t' to type 'int'} } + (bool) sve_u1; // { dg-error {cannot convert a vector of type 'svuint8_t' to type 'bool'} } + (svuint8_t) 0; // { dg-error {cannot convert a value of type 'int' to vector type 'svuint8_t'} } + (svuint8_t) n; // { dg-error {cannot convert a value of type 'int' to vector type 'svuint8_t'} } (svuint8_t) sve_u1; (svuint8_t) gnu_u1; - (svuint8_t) sve_s1; // { dg-error {invalid cast from type 'svint8_t' to type 'svuint8_t'} } - (svuint8_t) gnu_s1; // { dg-error {invalid cast from type 'gnu_int8_t'[^\n]* to type 'svuint8_t'} } + (svuint8_t) sve_s1; + (svuint8_t) gnu_s1; (void) gnu_u1; (int) gnu_u1; // { dg-error {cannot convert a vector of type 'gnu_uint8_t'[^\n]* to type 'int'} } @@ -114,7 +114,7 @@ f (svuint8_t sve_u1, svint8_t sve_s1, // Vector indexing. - sve_u1[0]; // { dg-error {subscripted value is neither array nor pointer} } + sve_u1[0]; &sve_u1[0]; // { dg-error {subscripted value is neither array nor pointer} } gnu_u1[0]; @@ -122,18 +122,18 @@ f (svuint8_t sve_u1, svint8_t sve_s1, // Unary vector arithmetic. - +sve_u1; // { dg-error {wrong type argument to unary plus} } - -sve_u1; // { dg-error {wrong type argument to unary minus} } - ~sve_u1; // { dg-error {wrong type argument to bit-complement} } - !sve_u1; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - // { dg-error {in argument to unary !} "" { target *-*-* } .-1 } + +sve_u1; + -sve_u1; + ~sve_u1; + !sve_u1; + *sve_u1; // { dg-error {invalid type argument of unary '\*'} } __real sve_u1; // { dg-error {wrong type argument to __real} } __imag sve_u1; // { dg-error {wrong type argument to __imag} } - ++sve_u1; // { dg-error {no pre-increment operator for type} } - --sve_u1; // { dg-error {no pre-decrement operator for type} } - sve_u1++; // { dg-error {no post-increment operator for type} } - sve_u1--; // { dg-error {no post-decrement operator for type} } + ++sve_u1; + --sve_u1; + sve_u1++; + sve_u1--; +gnu_u1; -gnu_u1; @@ -149,65 +149,65 @@ f (svuint8_t sve_u1, svint8_t sve_s1, // Vector-vector binary arithmetic. - sve_u1 + sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator\+'} } - sve_u1 - sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator-'} } - sve_u1 * sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator\*'} } - sve_u1 / sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator/'} } - sve_u1 % sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator%'} } - sve_u1 & sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator\&'} } - sve_u1 | sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator\|'} } - sve_u1 ^ sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator\^'} } - sve_u1 == sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator=='} } - sve_u1 != sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator!='} } - sve_u1 <= sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator<='} } - sve_u1 < sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator<'} } - sve_u1 > sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator>'} } - sve_u1 >= sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator>='} } - sve_u1 <=> sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator<=>'} } - sve_u1 << sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator<<'} } - sve_u1 >> sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator>>'} } - sve_u1 && sve_u1; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - sve_u1 || sve_u1; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - - sve_u1 + gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator\+'} } - sve_u1 - gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator-'} } - sve_u1 * gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator\*'} } - sve_u1 / gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator/'} } - sve_u1 % gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator%'} } - sve_u1 & gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator\&'} } - sve_u1 | gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator\|'} } - sve_u1 ^ gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator\^'} } - sve_u1 == gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator=='} } - sve_u1 != gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator!='} } - sve_u1 <= gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator<='} } - sve_u1 < gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator<'} } - sve_u1 > gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator>'} } - sve_u1 >= gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator>='} } - sve_u1 <=> gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator<=>'} } - sve_u1 << gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator<<'} } - sve_u1 >> gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator>>'} } - sve_u1 && gnu_u1; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - sve_u1 || gnu_u1; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - - gnu_u1 + sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator\+'} } - gnu_u1 - sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator-'} } - gnu_u1 * sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator\*'} } - gnu_u1 / sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator/'} } - gnu_u1 % sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator%'} } - gnu_u1 & sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator\&'} } - gnu_u1 | sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator\|'} } - gnu_u1 ^ sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator\^'} } - gnu_u1 == sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator=='} } - gnu_u1 != sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator!='} } - gnu_u1 <= sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator<='} } - gnu_u1 < sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator<'} } - gnu_u1 > sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator>'} } - gnu_u1 >= sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator>='} } - gnu_u1 <=> sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator<=>'} } - gnu_u1 << sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator<<'} } - gnu_u1 >> sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator>>'} } - gnu_u1 && sve_u1; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - gnu_u1 || sve_u1; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } + sve_u1 + sve_u1; + sve_u1 - sve_u1; + sve_u1 * sve_u1; + sve_u1 / sve_u1; + sve_u1 % sve_u1; + sve_u1 & sve_u1; + sve_u1 | sve_u1; + sve_u1 ^ sve_u1; + sve_u1 == sve_u1; + sve_u1 != sve_u1; + sve_u1 <= sve_u1; + sve_u1 < sve_u1; + sve_u1 > sve_u1; + sve_u1 >= sve_u1; + sve_u1 <=> sve_u1; // { dg-message {three-way comparison of vectors} } + sve_u1 << sve_u1; + sve_u1 >> sve_u1; + sve_u1 && sve_u1; + sve_u1 || sve_u1; + + sve_u1 + gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 - gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 * gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 / gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 % gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 & gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 | gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 ^ gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 == gnu_u1;// { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 != gnu_u1;// { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 <= gnu_u1;// { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 < gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 > gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 >= gnu_u1;// { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 <=> gnu_u1;// { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 << gnu_u1;// { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 >> gnu_u1;// { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 && gnu_u1;// { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 || gnu_u1;// { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + + gnu_u1 + sve_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 - sve_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 * sve_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 / sve_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 % sve_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 & sve_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 | sve_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 ^ sve_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 == sve_u1;// { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 != sve_u1;// { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 <= sve_u1;// { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 < sve_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 > sve_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 >= sve_u1;// { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 <=> sve_u1;// { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 << sve_u1;// { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 >> sve_u1;// { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 && sve_u1;// { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 || sve_u1;// { dg-error {cannot combine GNU and SVE vectors in a binary operation} } gnu_u1 + gnu_u1; gnu_u1 - gnu_u1; @@ -233,45 +233,45 @@ f (svuint8_t sve_u1, svint8_t sve_s1, // Vector-scalar binary arithmetic. - sve_u1 + 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator\+'} } - sve_u1 - 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator-'} } - sve_u1 * 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator\*'} } - sve_u1 / 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator/'} } - sve_u1 % 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator%'} } - sve_u1 & 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator\&'} } - sve_u1 | 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator\|'} } - sve_u1 ^ 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator\^'} } - sve_u1 == 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator=='} } - sve_u1 != 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator!='} } - sve_u1 <= 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator<='} } - sve_u1 < 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator<'} } - sve_u1 > 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator>'} } - sve_u1 >= 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator>='} } + sve_u1 + 2; + sve_u1 - 2; + sve_u1 * 2; + sve_u1 / 2; + sve_u1 % 2; + sve_u1 & 2; + sve_u1 | 2; + sve_u1 ^ 2; + sve_u1 == 2; + sve_u1 != 2; + sve_u1 <= 2; + sve_u1 < 2; + sve_u1 > 2; + sve_u1 >= 2; sve_u1 <=> 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator<=>'} } - sve_u1 << 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator<<'} } - sve_u1 >> 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator>>'} } - sve_u1 && 2; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - sve_u1 || 2; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - - sve_u1 + uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator\+'} } - sve_u1 - uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator-'} } - sve_u1 * uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator\*'} } - sve_u1 / uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator/'} } - sve_u1 % uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator%'} } - sve_u1 & uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator\&'} } - sve_u1 | uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator\|'} } - sve_u1 ^ uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator\^'} } - sve_u1 == uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator=='} } - sve_u1 != uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator!='} } - sve_u1 <= uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator<='} } - sve_u1 < uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator<'} } - sve_u1 > uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator>'} } - sve_u1 >= uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator>='} } + sve_u1 << 2; + sve_u1 >> 2; + sve_u1 && 2; + sve_u1 || 2; + + sve_u1 + uc; + sve_u1 - uc; + sve_u1 * uc; + sve_u1 / uc; + sve_u1 % uc; + sve_u1 & uc; + sve_u1 | uc; + sve_u1 ^ uc; + sve_u1 == uc; + sve_u1 != uc; + sve_u1 <= uc; + sve_u1 < uc; + sve_u1 > uc; + sve_u1 >= uc; sve_u1 <=> uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator<=>'} } - sve_u1 << uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator<<'} } - sve_u1 >> uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator>>'} } - sve_u1 && uc; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - sve_u1 || uc; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } + sve_u1 << uc; + sve_u1 >> uc; + sve_u1 && uc; + sve_u1 || uc; gnu_u1 + 2; gnu_u1 - 2; @@ -315,25 +315,25 @@ f (svuint8_t sve_u1, svint8_t sve_s1, // Scalar-vector binary 'operatorarithmetic. - 3 + sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator\+'} } - 3 - sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator-'} } - 3 * sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator\*'} } - 3 / sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator/'} } - 3 % sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator%'} } - 3 & sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator\&'} } - 3 | sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator\|'} } - 3 ^ sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator\^'} } - 3 == sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator=='} } - 3 != sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator!='} } - 3 <= sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator<='} } + 3 + sve_u1; + 3 - sve_u1; + 3 * sve_u1; + 3 / sve_u1; + 3 % sve_u1; + 3 & sve_u1; + 3 | sve_u1; + 3 ^ sve_u1; + 3 == sve_u1; + 3 != sve_u1; + 3 <= sve_u1; 3 <=> sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator<=>'} } - 3 < sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator<'} } - 3 > sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator>'} } - 3 >= sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator>='} } - 3 << sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator<<'} } - 3 >> sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator>>'} } - 3 && sve_u1; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - 3 || sve_u1; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } + 3 < sve_u1; + 3 > sve_u1; + 3 >= sve_u1; + 3 << sve_u1; + 3 >> sve_u1; + 3 && sve_u1; + 3 || sve_u1; 3 + gnu_u1; 3 - gnu_u1; @@ -357,59 +357,59 @@ f (svuint8_t sve_u1, svint8_t sve_s1, // Mismatched types. - sve_u1 + sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator\+'} } - sve_u1 - sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator-'} } - sve_u1 * sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator\*'} } - sve_u1 / sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator/'} } - sve_u1 % sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator%'} } - sve_u1 & sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator\&'} } - sve_u1 | sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator\|'} } - sve_u1 ^ sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator\^'} } - sve_u1 == sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator=='} } - sve_u1 != sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator!='} } - sve_u1 <= sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator<='} } - sve_u1 < sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator<'} } - sve_u1 > sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator>'} } - sve_u1 >= sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator>='} } - sve_u1 <=> sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator<=>'} } - sve_u1 << sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator<<'} } - sve_u1 >> sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator>>'} } - - sve_u1 + gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator\+'} } - sve_u1 - gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator-'} } - sve_u1 * gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator\*'} } - sve_u1 / gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator/'} } - sve_u1 % gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator%'} } - sve_u1 & gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator\&'} } - sve_u1 | gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator\|'} } - sve_u1 ^ gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator\^'} } - sve_u1 == gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator=='} } - sve_u1 != gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator!='} } - sve_u1 <= gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator<='} } - sve_u1 < gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator<'} } - sve_u1 > gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator>'} } - sve_u1 >= gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator>='} } - sve_u1 <=> gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator<=>'} } - sve_u1 << gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator<<'} } - sve_u1 >> gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator>>'} } - - gnu_u1 + sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator\+'} } - gnu_u1 - sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator-'} } - gnu_u1 * sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator\*'} } - gnu_u1 / sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator/'} } - gnu_u1 % sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator%'} } - gnu_u1 & sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator\&'} } - gnu_u1 | sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator\|'} } - gnu_u1 ^ sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator\^'} } - gnu_u1 == sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator=='} } - gnu_u1 != sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator!='} } - gnu_u1 <= sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator<='} } - gnu_u1 < sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator<'} } - gnu_u1 > sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator>'} } - gnu_u1 >= sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator>='} } - gnu_u1 <=> sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator<=>'} } - gnu_u1 << sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator<<'} } - gnu_u1 >> sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator>>'} } + sve_u1 + sve_s1; + sve_u1 - sve_s1; + sve_u1 * sve_s1; + sve_u1 / sve_s1; + sve_u1 % sve_s1; + sve_u1 & sve_s1; + sve_u1 | sve_s1; + sve_u1 ^ sve_s1; + sve_u1 == sve_s1; + sve_u1 != sve_s1; + sve_u1 <= sve_s1; + sve_u1 < sve_s1; + sve_u1 > sve_s1; + sve_u1 >= sve_s1; + sve_u1 <=> sve_s1; // { dg-message {three-way comparison of vectors} } + sve_u1 << sve_s1; + sve_u1 >> sve_s1; + + sve_u1 + gnu_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 - gnu_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 * gnu_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 / gnu_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 % gnu_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 & gnu_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 | gnu_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 ^ gnu_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 == gnu_s1;// { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 != gnu_s1;// { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 <= gnu_s1;// { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 < gnu_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 > gnu_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 >= gnu_s1;// { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 <=> gnu_s1;// { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 << gnu_s1;// { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 >> gnu_s1;// { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + + gnu_u1 + sve_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 - sve_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 * sve_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 / sve_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 % sve_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 & sve_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 | sve_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 ^ sve_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 == sve_s1;// { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 != sve_s1;// { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 <= sve_s1;// { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 < sve_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 > sve_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 >= sve_s1;// { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 <=> sve_s1;// { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 << sve_s1;// { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 >> sve_s1;// { dg-error {cannot combine GNU and SVE vectors in a binary operation} } gnu_u1 + gnu_s1; gnu_u1 - gnu_s1; @@ -438,35 +438,35 @@ f (svuint8_t sve_u1, svint8_t sve_s1, uc ? sve_u1 : gnu_u1; // { dg-error {operands to '\?:' have different types 'svuint8_t' and 'gnu_uint8_t'} } uc ? gnu_u1 : gnu_u1; - sve_u1 ? sve_u1 : sve_u1; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - sve_u1 ? gnu_u1 : sve_u1; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - sve_u1 ? sve_u1 : gnu_u1; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - sve_u1 ? gnu_u1 : gnu_u1; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - sve_u1 ? sve_u1 : uc; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - sve_u1 ? uc : sve_u1; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - sve_u1 ? gnu_u1 : uc; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - sve_u1 ? uc : gnu_u1; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } + sve_u1 ? sve_u1 : sve_u1; + sve_u1 ? gnu_u1 : sve_u1; // { dg-error {incompatible vector types in conditional expression} } + sve_u1 ? sve_u1 : gnu_u1; // { dg-error {incompatible vector types in conditional expression} } + sve_u1 ? gnu_u1 : gnu_u1; + sve_u1 ? sve_u1 : uc; + sve_u1 ? uc : sve_u1; + sve_u1 ? gnu_u1 : uc; + sve_u1 ? uc : gnu_u1; - gnu_u1 ? sve_u1 : sve_u1; // { dg-error {incompatible vector types in conditional expression} } + gnu_u1 ? sve_u1 : sve_u1; gnu_u1 ? gnu_u1 : sve_u1; // { dg-error {incompatible vector types in conditional expression} } gnu_u1 ? sve_u1 : gnu_u1; // { dg-error {incompatible vector types in conditional expression} } gnu_u1 ? gnu_u1 : gnu_u1; - gnu_u1 ? sve_u1 : uc; // { dg-error {incompatible vector types in conditional expression} } - gnu_u1 ? uc : sve_u1; // { dg-error {incompatible vector types in conditional expression} } + gnu_u1 ? sve_u1 : uc; + gnu_u1 ? uc : sve_u1; gnu_u1 ? gnu_u1 : uc; gnu_u1 ? uc : gnu_u1; // Vector built-ins. - __builtin_shuffle (sve_u1, sve_u1, sve_u1); // { dg-error {'__builtin_shuffle' last argument must be an integer vector} } - __builtin_shuffle (sve_u1, gnu_u1, gnu_u1); // { dg-error {'__builtin_shuffle' arguments must be vectors} } - __builtin_shuffle (gnu_u1, sve_u1, gnu_u1); // { dg-error {'__builtin_shuffle' arguments must be vectors} } - __builtin_shuffle (gnu_u1, gnu_u1, sve_u1); // { dg-error {'__builtin_shuffle' last argument must be an integer vector} } + __builtin_shuffle (sve_u1, sve_u1, sve_u1); + __builtin_shuffle (sve_u1, gnu_u1, gnu_u1); // { dg-error {'__builtin_shuffle' argument vectors must be of the same type} } + __builtin_shuffle (gnu_u1, sve_u1, gnu_u1); // { dg-error {'__builtin_shuffle' argument vectors must be of the same type} } + __builtin_shuffle (gnu_u1, gnu_u1, sve_u1); __builtin_shuffle (gnu_u1, gnu_u1, gnu_u1); - __builtin_convertvector (sve_u1, svuint8_t); // { dg-error {'__builtin_convertvector' first argument must be an integer or floating vector} } - __builtin_convertvector (gnu_u1, svuint8_t); // { dg-error {'__builtin_convertvector' second argument must be an integer or floating vector type} } - __builtin_convertvector (sve_u1, gnu_uint8_t); // { dg-error {'__builtin_convertvector' first argument must be an integer or floating vector} } + __builtin_convertvector (sve_u1, svuint8_t); + __builtin_convertvector (gnu_u1, svuint8_t); + __builtin_convertvector (sve_u1, gnu_uint8_t); __builtin_convertvector (gnu_u1, gnu_uint8_t); // Type queries. diff --git a/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/gnu_vectors_2.C b/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/gnu_vectors_2.C index 30b2ca59d79..2e9f688946f 100644 --- a/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/gnu_vectors_2.C +++ b/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/gnu_vectors_2.C @@ -14,20 +14,20 @@ f (svuint8_t sve_u1, svint8_t sve_s1, svuint8_t init_sve_u1 = 0; // { dg-error {cannot convert 'int' to 'svuint8_t' in initialization} } svuint8_t init_sve_u2 = {}; svuint8_t init_sve_u3 = { sve_u1 }; - svuint8_t init_sve_u4 = { gnu_u1 }; - svuint8_t init_sve_u5 = { sve_s1 }; - svuint8_t init_sve_u6 = { gnu_s1 }; - svuint8_t init_sve_u7 = { 0 }; // { dg-error {cannot convert 'int' to 'svuint8_t' in initialization} } - svuint8_t init_sve_u8 = { sve_u1, sve_u1 }; // { dg-error {too many initializers for 'svuint8_t'} } - svuint8_t init_sve_u9 = { gnu_u1, gnu_u1 }; // { dg-error {too many initializers for 'svuint8_t'} } + svuint8_t init_sve_u4 = { gnu_u1 }; // { dg-error {cannot convert 'gnu_uint8_t'[^\n]* to 'unsigned char' in initialization} } + svuint8_t init_sve_u5 = { sve_s1 }; // { dg-error {cannot convert 'svint8_t' to 'unsigned char' in initialization} } + svuint8_t init_sve_u6 = { gnu_s1 }; // { dg-error {cannot convert 'gnu_int8_t'[^\n]* to 'unsigned char' in initialization} } + svuint8_t init_sve_u7 = { 0 }; + svuint8_t init_sve_u8 = { sve_u1, sve_u1 }; // { dg-error {cannot convert 'svuint8_t' to 'unsigned char' in initialization} } + svuint8_t init_sve_u9 = { gnu_u1, gnu_u1 }; // { dg-error {cannot convert 'gnu_uint8_t'[^\n]* to 'unsigned char' in initialization} } svuint8_t init_sve_u10 {}; svuint8_t init_sve_u11 { sve_u1 }; - svuint8_t init_sve_u12 { gnu_u1 }; - svuint8_t init_sve_u13 { sve_s1 }; - svuint8_t init_sve_u14 { gnu_s1 }; - svuint8_t init_sve_u15 { 0 }; // { dg-error {cannot convert 'int' to 'svuint8_t' in initialization} } - svuint8_t init_sve_u16 { sve_u1, sve_u1 }; // { dg-error {too many initializers for 'svuint8_t'} } - svuint8_t init_sve_u17 { gnu_u1, gnu_u1 }; // { dg-error {too many initializers for 'svuint8_t'} } + svuint8_t init_sve_u12 { gnu_u1 }; // { dg-error {cannot convert 'gnu_uint8_t'[^\n]* to 'unsigned char' in initialization} } + svuint8_t init_sve_u13 { sve_s1 }; // { dg-error {cannot convert 'svint8_t' to 'unsigned char' in initialization} } + svuint8_t init_sve_u14 { gnu_s1 }; // { dg-error {cannot convert 'gnu_int8_t'[^\n]* to 'unsigned char' in initialization} } + svuint8_t init_sve_u15 { 0 }; + svuint8_t init_sve_u16 { sve_u1, sve_u1 }; // { dg-error {cannot convert 'svuint8_t' to 'unsigned char' in initialization} } + svuint8_t init_sve_u17 { gnu_u1, gnu_u1 }; // { dg-error {cannot convert 'gnu_uint8_t'[^\n]* to 'unsigned char' in initialization} } svuint8_t init_sve_u18 (0); // { dg-error {cannot convert 'int' to 'svuint8_t' in initialization} } svuint8_t init_sve_u19 (sve_u1); svuint8_t init_sve_u20 (gnu_u1); @@ -59,13 +59,13 @@ f (svuint8_t sve_u1, svint8_t sve_s1, // Compound literals (svuint8_t) {}; - (svuint8_t) { 0 }; // { dg-error {cannot convert 'int' to 'svuint8_t' in initialization} } + (svuint8_t) { 0 }; (svuint8_t) { sve_u1 }; - (svuint8_t) { gnu_u1 }; - (svuint8_t) { sve_s1 }; - (svuint8_t) { gnu_s1 }; - (svuint8_t) { sve_u1, sve_u1 }; // { dg-error {too many initializers for 'svuint8_t'} } - (svuint8_t) { gnu_u1, gnu_u1 }; // { dg-error {too many initializers for 'svuint8_t'} } + (svuint8_t) { gnu_u1 }; // { dg-error {cannot convert 'gnu_uint8_t'[^\n]* to 'unsigned char' in initialization} } + (svuint8_t) { sve_s1 }; // { dg-error {cannot convert 'svint8_t' to 'unsigned char' in initialization} } + (svuint8_t) { gnu_s1 }; // { dg-error {cannot convert 'gnu_int8_t'[^\n]* to 'unsigned char' in initialization} } + (svuint8_t) { sve_u1, sve_u1 }; // { dg-error {cannot convert 'svuint8_t' to 'unsigned char' in initialization} } + (svuint8_t) { gnu_u1, gnu_u1 }; // { dg-error {cannot convert 'gnu_uint8_t'[^\n]* to 'unsigned char' in initialization} } (gnu_uint8_t) {}; (gnu_uint8_t) { 0 }; @@ -93,10 +93,10 @@ f (svuint8_t sve_u1, svint8_t sve_s1, // Casts (void) sve_u1; - (int) sve_u1; // { dg-error {invalid cast from type 'svuint8_t' to type 'int'} } - (bool) sve_u1; // { dg-error {invalid cast from type 'svuint8_t' to type 'bool'} } - (svuint8_t) 0; // { dg-error {invalid cast from type 'int' to type 'svuint8_t'} } - (svuint8_t) n; // { dg-error {invalid cast from type 'int' to type 'svuint8_t'} } + (int) sve_u1; // { dg-error {cannot convert a vector of type 'svuint8_t' to type 'int'} } + (bool) sve_u1; // { dg-error {cannot convert a vector of type 'svuint8_t' to type 'bool'} } + (svuint8_t) 0; // { dg-error {cannot convert a value of type 'int' to vector type 'svuint8_t'} } + (svuint8_t) n; // { dg-error {cannot convert a value of type 'int' to vector type 'svuint8_t'} } (svuint8_t) sve_u1; (svuint8_t) gnu_u1; (svuint8_t) sve_s1; @@ -114,7 +114,7 @@ f (svuint8_t sve_u1, svint8_t sve_s1, // Vector indexing. - sve_u1[0]; // { dg-error {subscripted value is neither array nor pointer} } + sve_u1[0]; &sve_u1[0]; // { dg-error {subscripted value is neither array nor pointer} } gnu_u1[0]; @@ -122,18 +122,18 @@ f (svuint8_t sve_u1, svint8_t sve_s1, // Unary vector arithmetic. - +sve_u1; // { dg-error {wrong type argument to unary plus} } - -sve_u1; // { dg-error {wrong type argument to unary minus} } - ~sve_u1; // { dg-error {wrong type argument to bit-complement} } - !sve_u1; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - // { dg-error {in argument to unary !} "" { target *-*-* } .-1 } + +sve_u1; + -sve_u1; + ~sve_u1; + !sve_u1; + *sve_u1; // { dg-error {invalid type argument of unary '\*'} } __real sve_u1; // { dg-error {wrong type argument to __real} } __imag sve_u1; // { dg-error {wrong type argument to __imag} } - ++sve_u1; // { dg-error {no pre-increment operator for type} } - --sve_u1; // { dg-error {no pre-decrement operator for type} } - sve_u1++; // { dg-error {no post-increment operator for type} } - sve_u1--; // { dg-error {no post-decrement operator for type} } + ++sve_u1; + --sve_u1; + sve_u1++; + sve_u1--; +gnu_u1; -gnu_u1; @@ -149,65 +149,65 @@ f (svuint8_t sve_u1, svint8_t sve_s1, // Vector-vector binary arithmetic. - sve_u1 + sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator\+'} } - sve_u1 - sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator-'} } - sve_u1 * sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator\*'} } - sve_u1 / sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator/'} } - sve_u1 % sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator%'} } - sve_u1 & sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator\&'} } - sve_u1 | sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator\|'} } - sve_u1 ^ sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator\^'} } - sve_u1 == sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator=='} } - sve_u1 != sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator!='} } - sve_u1 <= sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator<='} } - sve_u1 < sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator<'} } - sve_u1 > sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator>'} } - sve_u1 >= sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator>='} } - sve_u1 <=> sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator<=>'} } - sve_u1 << sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator<<'} } - sve_u1 >> sve_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'svuint8_t' to binary 'operator>>'} } - sve_u1 && sve_u1; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - sve_u1 || sve_u1; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - - sve_u1 + gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator\+'} } - sve_u1 - gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator-'} } - sve_u1 * gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator\*'} } - sve_u1 / gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator/'} } - sve_u1 % gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator%'} } - sve_u1 & gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator\&'} } - sve_u1 | gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator\|'} } - sve_u1 ^ gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator\^'} } - sve_u1 == gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator=='} } - sve_u1 != gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator!='} } - sve_u1 <= gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator<='} } - sve_u1 < gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator<'} } - sve_u1 > gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator>'} } - sve_u1 >= gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator>='} } - sve_u1 <=> gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator<=>'} } - sve_u1 << gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator<<'} } - sve_u1 >> gnu_u1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_uint8_t'[^\n]* to binary 'operator>>'} } - sve_u1 && gnu_u1; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - sve_u1 || gnu_u1; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - - gnu_u1 + sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator\+'} } - gnu_u1 - sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator-'} } - gnu_u1 * sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator\*'} } - gnu_u1 / sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator/'} } - gnu_u1 % sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator%'} } - gnu_u1 & sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator\&'} } - gnu_u1 | sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator\|'} } - gnu_u1 ^ sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator\^'} } - gnu_u1 == sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator=='} } - gnu_u1 != sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator!='} } - gnu_u1 <= sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator<='} } - gnu_u1 < sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator<'} } - gnu_u1 > sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator>'} } - gnu_u1 >= sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator>='} } - gnu_u1 <=> sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator<=>'} } - gnu_u1 << sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator<<'} } - gnu_u1 >> sve_u1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svuint8_t' to binary 'operator>>'} } - gnu_u1 && sve_u1; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - gnu_u1 || sve_u1; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } + sve_u1 + sve_u1; + sve_u1 - sve_u1; + sve_u1 * sve_u1; + sve_u1 / sve_u1; + sve_u1 % sve_u1; + sve_u1 & sve_u1; + sve_u1 | sve_u1; + sve_u1 ^ sve_u1; + sve_u1 == sve_u1; + sve_u1 != sve_u1; + sve_u1 <= sve_u1; + sve_u1 < sve_u1; + sve_u1 > sve_u1; + sve_u1 >= sve_u1; + sve_u1 <=> sve_u1; // { dg-message {three-way comparison of vectors} } + sve_u1 << sve_u1; + sve_u1 >> sve_u1; + sve_u1 && sve_u1; + sve_u1 || sve_u1; + + sve_u1 + gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 - gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 * gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 / gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 % gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 & gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 | gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 ^ gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 == gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 != gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 <= gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 < gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 > gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 >= gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 <=> gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 << gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 >> gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 && gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 || gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + + gnu_u1 + sve_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 - sve_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 * sve_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 / sve_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 % sve_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 & sve_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 | sve_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 ^ sve_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 == sve_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 != sve_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 <= sve_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 < sve_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 > sve_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 >= sve_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 <=> sve_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 << sve_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 >> sve_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 && sve_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 || sve_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } gnu_u1 + gnu_u1; gnu_u1 - gnu_u1; @@ -233,45 +233,45 @@ f (svuint8_t sve_u1, svint8_t sve_s1, // Vector-scalar binary arithmetic. - sve_u1 + 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator\+'} } - sve_u1 - 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator-'} } - sve_u1 * 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator\*'} } - sve_u1 / 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator/'} } - sve_u1 % 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator%'} } - sve_u1 & 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator\&'} } - sve_u1 | 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator\|'} } - sve_u1 ^ 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator\^'} } - sve_u1 == 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator=='} } - sve_u1 != 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator!='} } - sve_u1 <= 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator<='} } - sve_u1 < 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator<'} } - sve_u1 > 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator>'} } - sve_u1 >= 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator>='} } + sve_u1 + 2; + sve_u1 - 2; + sve_u1 * 2; + sve_u1 / 2; + sve_u1 % 2; + sve_u1 & 2; + sve_u1 | 2; + sve_u1 ^ 2; + sve_u1 == 2; + sve_u1 != 2; + sve_u1 <= 2; + sve_u1 < 2; + sve_u1 > 2; + sve_u1 >= 2; sve_u1 <=> 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator<=>'} } - sve_u1 << 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator<<'} } - sve_u1 >> 2; // { dg-error {invalid operands of types 'svuint8_t' and 'int' to binary 'operator>>'} } - sve_u1 && 2; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - sve_u1 || 2; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - - sve_u1 + uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator\+'} } - sve_u1 - uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator-'} } - sve_u1 * uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator\*'} } - sve_u1 / uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator/'} } - sve_u1 % uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator%'} } - sve_u1 & uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator\&'} } - sve_u1 | uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator\|'} } - sve_u1 ^ uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator\^'} } - sve_u1 == uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator=='} } - sve_u1 != uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator!='} } - sve_u1 <= uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator<='} } - sve_u1 < uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator<'} } - sve_u1 > uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator>'} } - sve_u1 >= uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator>='} } + sve_u1 << 2; + sve_u1 >> 2; + sve_u1 && 2; + sve_u1 || 2; + + sve_u1 + uc; + sve_u1 - uc; + sve_u1 * uc; + sve_u1 / uc; + sve_u1 % uc; + sve_u1 & uc; + sve_u1 | uc; + sve_u1 ^ uc; + sve_u1 == uc; + sve_u1 != uc; + sve_u1 <= uc; + sve_u1 < uc; + sve_u1 > uc; + sve_u1 >= uc; sve_u1 <=> uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator<=>'} } - sve_u1 << uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator<<'} } - sve_u1 >> uc; // { dg-error {invalid operands of types 'svuint8_t' and 'unsigned char' to binary 'operator>>'} } - sve_u1 && uc; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - sve_u1 || uc; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } + sve_u1 << uc; + sve_u1 >> uc; + sve_u1 && uc; + sve_u1 || uc; gnu_u1 + 2; gnu_u1 - 2; @@ -315,25 +315,25 @@ f (svuint8_t sve_u1, svint8_t sve_s1, // Scalar-vector binary 'operatorarithmetic. - 3 + sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator\+'} } - 3 - sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator-'} } - 3 * sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator\*'} } - 3 / sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator/'} } - 3 % sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator%'} } - 3 & sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator\&'} } - 3 | sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator\|'} } - 3 ^ sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator\^'} } - 3 == sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator=='} } - 3 != sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator!='} } - 3 <= sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator<='} } + 3 + sve_u1; + 3 - sve_u1; + 3 * sve_u1; + 3 / sve_u1; + 3 % sve_u1; + 3 & sve_u1; + 3 | sve_u1; + 3 ^ sve_u1; + 3 == sve_u1; + 3 != sve_u1; + 3 <= sve_u1; 3 <=> sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator<=>'} } - 3 < sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator<'} } - 3 > sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator>'} } - 3 >= sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator>='} } - 3 << sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator<<'} } - 3 >> sve_u1; // { dg-error {invalid operands of types 'int' and 'svuint8_t' to binary 'operator>>'} } - 3 && sve_u1; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - 3 || sve_u1; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } + 3 < sve_u1; + 3 > sve_u1; + 3 >= sve_u1; + 3 << sve_u1; + 3 >> sve_u1; + 3 && sve_u1; + 3 || sve_u1; 3 + gnu_u1; 3 - gnu_u1; @@ -357,59 +357,59 @@ f (svuint8_t sve_u1, svint8_t sve_s1, // Mismatched types. - sve_u1 + sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator\+'} } - sve_u1 - sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator-'} } - sve_u1 * sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator\*'} } - sve_u1 / sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator/'} } - sve_u1 % sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator%'} } - sve_u1 & sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator\&'} } - sve_u1 | sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator\|'} } - sve_u1 ^ sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator\^'} } - sve_u1 == sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator=='} } - sve_u1 != sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator!='} } - sve_u1 <= sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator<='} } - sve_u1 < sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator<'} } - sve_u1 > sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator>'} } - sve_u1 >= sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator>='} } - sve_u1 <=> sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator<=>'} } - sve_u1 << sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator<<'} } - sve_u1 >> sve_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'svint8_t' to binary 'operator>>'} } - - sve_u1 + gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator\+'} } - sve_u1 - gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator-'} } - sve_u1 * gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator\*'} } - sve_u1 / gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator/'} } - sve_u1 % gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator%'} } - sve_u1 & gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator\&'} } - sve_u1 | gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator\|'} } - sve_u1 ^ gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator\^'} } - sve_u1 == gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator=='} } - sve_u1 != gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator!='} } - sve_u1 <= gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator<='} } - sve_u1 < gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator<'} } - sve_u1 > gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator>'} } - sve_u1 >= gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator>='} } - sve_u1 <=> gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator<=>'} } - sve_u1 << gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator<<'} } - sve_u1 >> gnu_s1; // { dg-error {invalid operands of types 'svuint8_t' and 'gnu_int8_t'[^\n]* to binary 'operator>>'} } - - gnu_u1 + sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator\+'} } - gnu_u1 - sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator-'} } - gnu_u1 * sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator\*'} } - gnu_u1 / sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator/'} } - gnu_u1 % sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator%'} } - gnu_u1 & sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator\&'} } - gnu_u1 | sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator\|'} } - gnu_u1 ^ sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator\^'} } - gnu_u1 == sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator=='} } - gnu_u1 != sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator!='} } - gnu_u1 <= sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator<='} } - gnu_u1 < sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator<'} } - gnu_u1 > sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator>'} } - gnu_u1 >= sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator>='} } - gnu_u1 <=> sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator<=>'} } - gnu_u1 << sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator<<'} } - gnu_u1 >> sve_s1; // { dg-error {invalid operands of types 'gnu_uint8_t'[^\n]* and 'svint8_t' to binary 'operator>>'} } + sve_u1 + sve_s1; + sve_u1 - sve_s1; + sve_u1 * sve_s1; + sve_u1 / sve_s1; + sve_u1 % sve_s1; + sve_u1 & sve_s1; + sve_u1 | sve_s1; + sve_u1 ^ sve_s1; + sve_u1 == sve_s1; + sve_u1 != sve_s1; + sve_u1 <= sve_s1; + sve_u1 < sve_s1; + sve_u1 > sve_s1; + sve_u1 >= sve_s1; + sve_u1 <=> sve_s1; // { dg-message {three-way comparison of vectors} } + sve_u1 << sve_s1; + sve_u1 >> sve_s1; + + sve_u1 + gnu_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 - gnu_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 * gnu_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 / gnu_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 % gnu_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 & gnu_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 | gnu_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 ^ gnu_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 == gnu_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 != gnu_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 <= gnu_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 < gnu_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 > gnu_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 >= gnu_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 <=> gnu_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 << gnu_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + sve_u1 >> gnu_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + + gnu_u1 + sve_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 - sve_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 * sve_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 / sve_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 % sve_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 & sve_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 | sve_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 ^ sve_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 == sve_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 != sve_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 <= sve_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 < sve_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 > sve_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 >= sve_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 <=> sve_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 << sve_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gnu_u1 >> sve_s1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } gnu_u1 + gnu_s1; gnu_u1 - gnu_s1; @@ -438,35 +438,35 @@ f (svuint8_t sve_u1, svint8_t sve_s1, uc ? sve_u1 : gnu_u1; // { dg-error {operands to '\?:' have different types 'svuint8_t' and 'gnu_uint8_t'} } uc ? gnu_u1 : gnu_u1; - sve_u1 ? sve_u1 : sve_u1; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - sve_u1 ? gnu_u1 : sve_u1; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - sve_u1 ? sve_u1 : gnu_u1; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - sve_u1 ? gnu_u1 : gnu_u1; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - sve_u1 ? sve_u1 : uc; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - sve_u1 ? uc : sve_u1; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - sve_u1 ? gnu_u1 : uc; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } - sve_u1 ? uc : gnu_u1; // { dg-error {could not convert 'sve_u1' from 'svuint8_t' to 'bool'} } + sve_u1 ? sve_u1 : sve_u1; + sve_u1 ? gnu_u1 : sve_u1; // { dg-error {incompatible vector types in conditional expression} } + sve_u1 ? sve_u1 : gnu_u1; // { dg-error {incompatible vector types in conditional expression} } + sve_u1 ? gnu_u1 : gnu_u1; + sve_u1 ? sve_u1 : uc; + sve_u1 ? uc : sve_u1; + sve_u1 ? gnu_u1 : uc; + sve_u1 ? uc : gnu_u1; - gnu_u1 ? sve_u1 : sve_u1; // { dg-error {incompatible vector types in conditional expression} } + gnu_u1 ? sve_u1 : sve_u1; gnu_u1 ? gnu_u1 : sve_u1; // { dg-error {incompatible vector types in conditional expression} } gnu_u1 ? sve_u1 : gnu_u1; // { dg-error {incompatible vector types in conditional expression} } gnu_u1 ? gnu_u1 : gnu_u1; - gnu_u1 ? sve_u1 : uc; // { dg-error {incompatible vector types in conditional expression} } - gnu_u1 ? uc : sve_u1; // { dg-error {incompatible vector types in conditional expression} } + gnu_u1 ? sve_u1 : uc; + gnu_u1 ? uc : sve_u1; gnu_u1 ? gnu_u1 : uc; gnu_u1 ? uc : gnu_u1; // Vector built-ins. - __builtin_shuffle (sve_u1, sve_u1, sve_u1); // { dg-error {'__builtin_shuffle' last argument must be an integer vector} } - __builtin_shuffle (sve_u1, gnu_u1, gnu_u1); // { dg-error {'__builtin_shuffle' arguments must be vectors} } - __builtin_shuffle (gnu_u1, sve_u1, gnu_u1); // { dg-error {'__builtin_shuffle' arguments must be vectors} } - __builtin_shuffle (gnu_u1, gnu_u1, sve_u1); // { dg-error {'__builtin_shuffle' last argument must be an integer vector} } + __builtin_shuffle (sve_u1, sve_u1, sve_u1); + __builtin_shuffle (sve_u1, gnu_u1, gnu_u1); // { dg-error {'__builtin_shuffle' argument vectors must be of the same type} } + __builtin_shuffle (gnu_u1, sve_u1, gnu_u1); // { dg-error {'__builtin_shuffle' argument vectors must be of the same type} } + __builtin_shuffle (gnu_u1, gnu_u1, sve_u1); __builtin_shuffle (gnu_u1, gnu_u1, gnu_u1); - __builtin_convertvector (sve_u1, svuint8_t); // { dg-error {'__builtin_convertvector' first argument must be an integer or floating vector} } - __builtin_convertvector (gnu_u1, svuint8_t); // { dg-error {'__builtin_convertvector' second argument must be an integer or floating vector type} } - __builtin_convertvector (sve_u1, gnu_uint8_t); // { dg-error {'__builtin_convertvector' first argument must be an integer or floating vector} } + __builtin_convertvector (sve_u1, svuint8_t); + __builtin_convertvector (gnu_u1, svuint8_t); + __builtin_convertvector (sve_u1, gnu_uint8_t); __builtin_convertvector (gnu_u1, gnu_uint8_t); // Type queries. diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/gnu_vectors_1.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/gnu_vectors_1.c index 9db9535831a..7a7eb42f57b 100644 --- a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/gnu_vectors_1.c +++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/gnu_vectors_1.c @@ -13,13 +13,14 @@ f (svuint8_t sve_u1, svint8_t sve_s1, svuint8_t init_sve_u1 = 0; /* { dg-error {incompatible types when initializing type 'svuint8_t' using type 'int'} } */ svuint8_t init_sve_u2 = {}; - svuint8_t init_sve_u3 = { sve_u1 }; - svuint8_t init_sve_u4 = { gnu_u1 }; - svuint8_t init_sve_u5 = { sve_s1 }; /* { dg-error {incompatible types when initializing type 'svuint8_t' using type 'svint8_t'} } */ - svuint8_t init_sve_u6 = { gnu_s1 }; /* { dg-error {incompatible types when initializing type 'svuint8_t'} } */ - svuint8_t init_sve_u7 = { 0 }; /* { dg-error {incompatible types when initializing type 'svuint8_t' using type 'int'} } */ - svuint8_t init_sve_u8 = { sve_u1, sve_u1 }; /* { dg-warning {excess elements in scalar initializer} } */ - svuint8_t init_sve_u9 = { gnu_u1, gnu_u1 }; /* { dg-warning {excess elements in scalar initializer} } */ + svuint8_t init_sve_u3 = { sve_u1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ + svuint8_t init_sve_u4 = { gnu_u1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ + svuint8_t init_sve_u5 = { sve_s1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ + svuint8_t init_sve_u6 = { gnu_s1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ + svuint8_t init_sve_u7 = { 0 }; + + svuint8_t init_sve_u8 = { sve_u1, sve_u1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ + svuint8_t init_sve_u9 = { gnu_u1, gnu_u1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ gnu_uint8_t init_gnu_u1 = 0; /* { dg-error {incompatible types when initializing type 'gnu_uint8_t'[^\n]* using type 'int'} } */ gnu_uint8_t init_gnu_u2 = {}; @@ -32,11 +33,11 @@ f (svuint8_t sve_u1, svint8_t sve_s1, /* Compound literals. */ (svuint8_t) {}; - (svuint8_t) { 0 }; /* { dg-error {incompatible types when initializing type 'svuint8_t' using type 'int'} } */ - (svuint8_t) { sve_u1 }; - (svuint8_t) { gnu_u1 }; - (svuint8_t) { sve_s1 }; /* { dg-error {incompatible types when initializing type 'svuint8_t' using type 'svint8_t'} } */ - (svuint8_t) { gnu_s1 }; /* { dg-error {incompatible types when initializing type 'svuint8_t'} } */ + (svuint8_t) { 0 }; + (svuint8_t) { sve_u1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ + (svuint8_t) { gnu_u1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ + (svuint8_t) { sve_s1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ + (svuint8_t) { gnu_s1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ (gnu_uint8_t) {}; (gnu_uint8_t) { 0 }; @@ -62,9 +63,9 @@ f (svuint8_t sve_u1, svint8_t sve_s1, (void) sve_u1; (svuint8_t) sve_u1; (svuint8_t) gnu_u1; - (svuint8_t) 0; /* { dg-error {conversion to non-scalar type requested} } */ - (svuint8_t) n; /* { dg-error {conversion to non-scalar type requested} } */ - (svint8_t) sve_u1; /* { dg-error {conversion to non-scalar type requested} } */ + (svuint8_t) 0; /* { dg-error {cannot convert a value of type 'int' to vector type '[^']*' which has different size} } */ + (svuint8_t) n; /* { dg-error {cannot convert a value of type 'int' to vector type '[^']*' which has different size} } */ + (svint8_t) sve_u1; (svint8_t) gnu_u1; (void) gnu_u1; @@ -77,7 +78,7 @@ f (svuint8_t sve_u1, svint8_t sve_s1, /* Vector indexing. */ - sve_u1[0]; /* { dg-error {subscripted value is neither array nor pointer} } */ + sve_u1[0]; &sve_u1[0]; /* { dg-error {subscripted value is neither array nor pointer} } */ gnu_u1[0]; @@ -85,17 +86,17 @@ f (svuint8_t sve_u1, svint8_t sve_s1, /* Unary operators. */ - +sve_u1; /* { dg-error {wrong type argument to unary plus} } */ - -sve_u1; /* { dg-error {wrong type argument to unary minus} } */ - ~sve_u1; /* { dg-error {wrong type argument to bit-complement} } */ + +sve_u1; + -sve_u1; + ~sve_u1; !sve_u1; /* { dg-error {wrong type argument to unary exclamation mark} } */ *sve_u1; /* { dg-error {invalid type argument of unary '\*'} } */ __real sve_u1; /* { dg-error {wrong type argument to __real} } */ __imag sve_u1; /* { dg-error {wrong type argument to __imag} } */ - ++sve_u1; /* { dg-error {wrong type argument to increment} } */ - --sve_u1; /* { dg-error {wrong type argument to decrement} } */ - sve_u1++; /* { dg-error {wrong type argument to increment} } */ - sve_u1--; /* { dg-error {wrong type argument to decrement} } */ + ++sve_u1; + --sve_u1; + sve_u1++; + sve_u1--; +gnu_u1; -gnu_u1; @@ -111,60 +112,60 @@ f (svuint8_t sve_u1, svint8_t sve_s1, /* Vector-vector binary arithmetic. */ - sve_u1 + sve_u1; /* { dg-error {invalid operands to binary \+} } */ - sve_u1 - sve_u1; /* { dg-error {invalid operands to binary -} } */ - sve_u1 * sve_u1; /* { dg-error {invalid operands to binary \*} } */ - sve_u1 / sve_u1; /* { dg-error {invalid operands to binary /} } */ - sve_u1 % sve_u1; /* { dg-error {invalid operands to binary %} } */ - sve_u1 & sve_u1; /* { dg-error {invalid operands to binary \&} } */ - sve_u1 | sve_u1; /* { dg-error {invalid operands to binary \|} } */ - sve_u1 ^ sve_u1; /* { dg-error {invalid operands to binary \^} } */ - sve_u1 == sve_u1; /* { dg-error {invalid operands to binary ==} } */ - sve_u1 != sve_u1; /* { dg-error {invalid operands to binary !=} } */ - sve_u1 <= sve_u1; /* { dg-error {invalid operands to binary <=} } */ - sve_u1 < sve_u1; /* { dg-error {invalid operands to binary <} } */ - sve_u1 > sve_u1; /* { dg-error {invalid operands to binary >} } */ - sve_u1 >= sve_u1; /* { dg-error {invalid operands to binary >=} } */ - sve_u1 << sve_u1; /* { dg-error {invalid operands to binary <<} } */ - sve_u1 >> sve_u1; /* { dg-error {invalid operands to binary >>} } */ + sve_u1 + sve_u1; + sve_u1 - sve_u1; + sve_u1 * sve_u1; + sve_u1 / sve_u1; + sve_u1 % sve_u1; + sve_u1 & sve_u1; + sve_u1 | sve_u1; + sve_u1 ^ sve_u1; + sve_u1 == sve_u1; + sve_u1 != sve_u1; + sve_u1 <= sve_u1; + sve_u1 < sve_u1; + sve_u1 > sve_u1; + sve_u1 >= sve_u1; + sve_u1 << sve_u1; + sve_u1 >> sve_u1; sve_u1 && sve_u1; /* { dg-error {used vector type where scalar is required} } */ sve_u1 || sve_u1; /* { dg-error {used vector type where scalar is required} } */ - sve_u1 + gnu_u1; /* { dg-error {invalid operands to binary \+} } */ - sve_u1 - gnu_u1; /* { dg-error {invalid operands to binary -} } */ - sve_u1 * gnu_u1; /* { dg-error {invalid operands to binary \*} } */ - sve_u1 / gnu_u1; /* { dg-error {invalid operands to binary /} } */ - sve_u1 % gnu_u1; /* { dg-error {invalid operands to binary %} } */ - sve_u1 & gnu_u1; /* { dg-error {invalid operands to binary \&} } */ - sve_u1 | gnu_u1; /* { dg-error {invalid operands to binary \|} } */ - sve_u1 ^ gnu_u1; /* { dg-error {invalid operands to binary \^} } */ - sve_u1 == gnu_u1; /* { dg-error {invalid operands to binary ==} } */ - sve_u1 != gnu_u1; /* { dg-error {invalid operands to binary !=} } */ - sve_u1 <= gnu_u1; /* { dg-error {invalid operands to binary <=} } */ - sve_u1 < gnu_u1; /* { dg-error {invalid operands to binary <} } */ - sve_u1 > gnu_u1; /* { dg-error {invalid operands to binary >} } */ - sve_u1 >= gnu_u1; /* { dg-error {invalid operands to binary >=} } */ - sve_u1 << gnu_u1; /* { dg-error {invalid operands to binary <<} } */ - sve_u1 >> gnu_u1; /* { dg-error {invalid operands to binary >>} } */ + sve_u1 + gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 - gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 * gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 / gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 % gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 & gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 | gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 ^ gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 == gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 != gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 <= gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 < gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 > gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 >= gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 << gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 >> gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ sve_u1 && gnu_u1; /* { dg-error {used vector type where scalar is required} } */ sve_u1 || gnu_u1; /* { dg-error {used vector type where scalar is required} } */ - gnu_u1 + sve_u1; /* { dg-error {invalid operands to binary \+} } */ - gnu_u1 - sve_u1; /* { dg-error {invalid operands to binary -} } */ - gnu_u1 * sve_u1; /* { dg-error {invalid operands to binary \*} } */ - gnu_u1 / sve_u1; /* { dg-error {invalid operands to binary /} } */ - gnu_u1 % sve_u1; /* { dg-error {invalid operands to binary %} } */ - gnu_u1 & sve_u1; /* { dg-error {invalid operands to binary \&} } */ - gnu_u1 | sve_u1; /* { dg-error {invalid operands to binary \|} } */ - gnu_u1 ^ sve_u1; /* { dg-error {invalid operands to binary \^} } */ - gnu_u1 == sve_u1; /* { dg-error {invalid operands to binary ==} } */ - gnu_u1 != sve_u1; /* { dg-error {invalid operands to binary !=} } */ - gnu_u1 <= sve_u1; /* { dg-error {invalid operands to binary <=} } */ - gnu_u1 < sve_u1; /* { dg-error {invalid operands to binary <} } */ - gnu_u1 > sve_u1; /* { dg-error {invalid operands to binary >} } */ - gnu_u1 >= sve_u1; /* { dg-error {invalid operands to binary >=} } */ - gnu_u1 << sve_u1; /* { dg-error {invalid operands to binary <<} } */ - gnu_u1 >> sve_u1; /* { dg-error {invalid operands to binary >>} } */ + gnu_u1 + sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 - sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 * sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 / sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 % sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 & sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 | sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 ^ sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 == sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 != sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 <= sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 < sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 > sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 >= sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 << sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 >> sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ gnu_u1 && sve_u1; /* { dg-error {used vector type where scalar is required} } */ gnu_u1 || sve_u1; /* { dg-error {used vector type where scalar is required} } */ @@ -189,41 +190,41 @@ f (svuint8_t sve_u1, svint8_t sve_s1, /* Vector-scalar binary arithmetic. */ - sve_u1 + 2; /* { dg-error {invalid operands to binary \+} } */ - sve_u1 - 2; /* { dg-error {invalid operands to binary -} } */ - sve_u1 * 2; /* { dg-error {invalid operands to binary \*} } */ - sve_u1 / 2; /* { dg-error {invalid operands to binary /} } */ - sve_u1 % 2; /* { dg-error {invalid operands to binary %} } */ - sve_u1 & 2; /* { dg-error {invalid operands to binary \&} } */ - sve_u1 | 2; /* { dg-error {invalid operands to binary \|} } */ - sve_u1 ^ 2; /* { dg-error {invalid operands to binary \^} } */ - sve_u1 == 2; /* { dg-error {invalid operands to binary ==} } */ - sve_u1 != 2; /* { dg-error {invalid operands to binary !=} } */ - sve_u1 <= 2; /* { dg-error {invalid operands to binary <=} } */ - sve_u1 < 2; /* { dg-error {invalid operands to binary <} } */ - sve_u1 > 2; /* { dg-error {invalid operands to binary >} } */ - sve_u1 >= 2; /* { dg-error {invalid operands to binary >=} } */ - sve_u1 << 2; /* { dg-error {invalid operands to binary <<} } */ - sve_u1 >> 2; /* { dg-error {invalid operands to binary >>} } */ + sve_u1 + 2; + sve_u1 - 2; + sve_u1 * 2; + sve_u1 / 2; + sve_u1 % 2; + sve_u1 & 2; + sve_u1 | 2; + sve_u1 ^ 2; + sve_u1 == 2; + sve_u1 != 2; + sve_u1 <= 2; + sve_u1 < 2; + sve_u1 > 2; + sve_u1 >= 2; + sve_u1 << 2; + sve_u1 >> 2; sve_u1 && 2; /* { dg-error {used vector type where scalar is required} } */ sve_u1 || 2; /* { dg-error {used vector type where scalar is required} } */ - sve_u1 + uc; /* { dg-error {invalid operands to binary \+} } */ - sve_u1 - uc; /* { dg-error {invalid operands to binary -} } */ - sve_u1 * uc; /* { dg-error {invalid operands to binary \*} } */ - sve_u1 / uc; /* { dg-error {invalid operands to binary /} } */ - sve_u1 % uc; /* { dg-error {invalid operands to binary %} } */ - sve_u1 & uc; /* { dg-error {invalid operands to binary \&} } */ - sve_u1 | uc; /* { dg-error {invalid operands to binary \|} } */ - sve_u1 ^ uc; /* { dg-error {invalid operands to binary \^} } */ - sve_u1 == uc; /* { dg-error {invalid operands to binary ==} } */ - sve_u1 != uc; /* { dg-error {invalid operands to binary !=} } */ - sve_u1 <= uc; /* { dg-error {invalid operands to binary <=} } */ - sve_u1 < uc; /* { dg-error {invalid operands to binary <} } */ - sve_u1 > uc; /* { dg-error {invalid operands to binary >} } */ - sve_u1 >= uc; /* { dg-error {invalid operands to binary >=} } */ - sve_u1 << uc; /* { dg-error {invalid operands to binary <<} } */ - sve_u1 >> uc; /* { dg-error {invalid operands to binary >>} } */ + sve_u1 + uc; + sve_u1 - uc; + sve_u1 * uc; + sve_u1 / uc; + sve_u1 % uc; + sve_u1 & uc; + sve_u1 | uc; + sve_u1 ^ uc; + sve_u1 == uc; + sve_u1 != uc; + sve_u1 <= uc; + sve_u1 < uc; + sve_u1 > uc; + sve_u1 >= uc; + sve_u1 << uc; + sve_u1 >> uc; sve_u1 && uc; /* { dg-error {used vector type where scalar is required} } */ sve_u1 || uc; /* { dg-error {used vector type where scalar is required} } */ @@ -267,22 +268,22 @@ f (svuint8_t sve_u1, svint8_t sve_s1, /* Scalar-vector binary arithmetic. */ - 3 + sve_u1; /* { dg-error {invalid operands to binary \+} } */ - 3 - sve_u1; /* { dg-error {invalid operands to binary -} } */ - 3 * sve_u1; /* { dg-error {invalid operands to binary \*} } */ - 3 / sve_u1; /* { dg-error {invalid operands to binary /} } */ - 3 % sve_u1; /* { dg-error {invalid operands to binary %} } */ - 3 & sve_u1; /* { dg-error {invalid operands to binary \&} } */ - 3 | sve_u1; /* { dg-error {invalid operands to binary \|} } */ - 3 ^ sve_u1; /* { dg-error {invalid operands to binary \^} } */ - 3 == sve_u1; /* { dg-error {invalid operands to binary ==} } */ - 3 != sve_u1; /* { dg-error {invalid operands to binary !=} } */ - 3 <= sve_u1; /* { dg-error {invalid operands to binary <=} } */ - 3 < sve_u1; /* { dg-error {invalid operands to binary <} } */ - 3 > sve_u1; /* { dg-error {invalid operands to binary >} } */ - 3 >= sve_u1; /* { dg-error {invalid operands to binary >=} } */ - 3 << sve_u1; /* { dg-error {invalid operands to binary <<} } */ - 3 >> sve_u1; /* { dg-error {invalid operands to binary >>} } */ + 3 + sve_u1; + 3 - sve_u1; + 3 * sve_u1; + 3 / sve_u1; + 3 % sve_u1; + 3 & sve_u1; + 3 | sve_u1; + 3 ^ sve_u1; + 3 == sve_u1; + 3 != sve_u1; + 3 <= sve_u1; + 3 < sve_u1; + 3 > sve_u1; + 3 >= sve_u1; + 3 << sve_u1; + 3 >> sve_u1; 3 && sve_u1; /* { dg-error {invalid operands to binary \&\&} } */ 3 || sve_u1; /* { dg-error {invalid operands to binary \|\|} } */ @@ -307,60 +308,60 @@ f (svuint8_t sve_u1, svint8_t sve_s1, /* Mismatched types. */ - sve_u1 + sve_s1; /* { dg-error {invalid operands to binary \+} } */ - sve_u1 - sve_s1; /* { dg-error {invalid operands to binary -} } */ - sve_u1 * sve_s1; /* { dg-error {invalid operands to binary \*} } */ - sve_u1 / sve_s1; /* { dg-error {invalid operands to binary /} } */ - sve_u1 % sve_s1; /* { dg-error {invalid operands to binary %} } */ - sve_u1 & sve_s1; /* { dg-error {invalid operands to binary \&} } */ - sve_u1 | sve_s1; /* { dg-error {invalid operands to binary \|} } */ - sve_u1 ^ sve_s1; /* { dg-error {invalid operands to binary \^} } */ - sve_u1 == sve_s1; /* { dg-error {invalid operands to binary ==} } */ - sve_u1 != sve_s1; /* { dg-error {invalid operands to binary !=} } */ - sve_u1 <= sve_s1; /* { dg-error {invalid operands to binary <=} } */ - sve_u1 < sve_s1; /* { dg-error {invalid operands to binary <} } */ - sve_u1 > sve_s1; /* { dg-error {invalid operands to binary >} } */ - sve_u1 >= sve_s1; /* { dg-error {invalid operands to binary >=} } */ - sve_u1 << sve_s1; /* { dg-error {invalid operands to binary <<} } */ - sve_u1 >> sve_s1; /* { dg-error {invalid operands to binary >>} } */ + sve_u1 + sve_s1; + sve_u1 - sve_s1; + sve_u1 * sve_s1; + sve_u1 / sve_s1; + sve_u1 % sve_s1; + sve_u1 & sve_s1; + sve_u1 | sve_s1; + sve_u1 ^ sve_s1; + sve_u1 == sve_s1; + sve_u1 != sve_s1; + sve_u1 <= sve_s1; + sve_u1 < sve_s1; + sve_u1 > sve_s1; + sve_u1 >= sve_s1; + sve_u1 << sve_s1; + sve_u1 >> sve_s1; sve_u1 && sve_s1; /* { dg-error {used vector type where scalar is required} } */ sve_u1 || sve_s1; /* { dg-error {used vector type where scalar is required} } */ - sve_u1 + gnu_s1; /* { dg-error {invalid operands to binary \+} } */ - sve_u1 - gnu_s1; /* { dg-error {invalid operands to binary -} } */ - sve_u1 * gnu_s1; /* { dg-error {invalid operands to binary \*} } */ - sve_u1 / gnu_s1; /* { dg-error {invalid operands to binary /} } */ - sve_u1 % gnu_s1; /* { dg-error {invalid operands to binary %} } */ - sve_u1 & gnu_s1; /* { dg-error {invalid operands to binary \&} } */ - sve_u1 | gnu_s1; /* { dg-error {invalid operands to binary \|} } */ - sve_u1 ^ gnu_s1; /* { dg-error {invalid operands to binary \^} } */ - sve_u1 == gnu_s1; /* { dg-error {invalid operands to binary ==} } */ - sve_u1 != gnu_s1; /* { dg-error {invalid operands to binary !=} } */ - sve_u1 <= gnu_s1; /* { dg-error {invalid operands to binary <=} } */ - sve_u1 < gnu_s1; /* { dg-error {invalid operands to binary <} } */ - sve_u1 > gnu_s1; /* { dg-error {invalid operands to binary >} } */ - sve_u1 >= gnu_s1; /* { dg-error {invalid operands to binary >=} } */ - sve_u1 << gnu_s1; /* { dg-error {invalid operands to binary <<} } */ - sve_u1 >> gnu_s1; /* { dg-error {invalid operands to binary >>} } */ + sve_u1 + gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 - gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 * gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 / gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 % gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 & gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 | gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 ^ gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 == gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 != gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 <= gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 < gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 > gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 >= gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 << gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 >> gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ sve_u1 && gnu_s1; /* { dg-error {used vector type where scalar is required} } */ sve_u1 || gnu_s1; /* { dg-error {used vector type where scalar is required} } */ - gnu_u1 + sve_s1; /* { dg-error {invalid operands to binary \+} } */ - gnu_u1 - sve_s1; /* { dg-error {invalid operands to binary -} } */ - gnu_u1 * sve_s1; /* { dg-error {invalid operands to binary \*} } */ - gnu_u1 / sve_s1; /* { dg-error {invalid operands to binary /} } */ - gnu_u1 % sve_s1; /* { dg-error {invalid operands to binary %} } */ - gnu_u1 & sve_s1; /* { dg-error {invalid operands to binary \&} } */ - gnu_u1 | sve_s1; /* { dg-error {invalid operands to binary \|} } */ - gnu_u1 ^ sve_s1; /* { dg-error {invalid operands to binary \^} } */ - gnu_u1 == sve_s1; /* { dg-error {invalid operands to binary ==} } */ - gnu_u1 != sve_s1; /* { dg-error {invalid operands to binary !=} } */ - gnu_u1 <= sve_s1; /* { dg-error {invalid operands to binary <=} } */ - gnu_u1 < sve_s1; /* { dg-error {invalid operands to binary <} } */ - gnu_u1 > sve_s1; /* { dg-error {invalid operands to binary >} } */ - gnu_u1 >= sve_s1; /* { dg-error {invalid operands to binary >=} } */ - gnu_u1 << sve_s1; /* { dg-error {invalid operands to binary <<} } */ - gnu_u1 >> sve_s1; /* { dg-error {invalid operands to binary >>} } */ + gnu_u1 + sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 - sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 * sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 / sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 % sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 & sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 | sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 ^ sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 == sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 != sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 <= sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 < sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 > sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 >= sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 << sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 >> sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ gnu_u1 && sve_s1; /* { dg-error {used vector type where scalar is required} } */ gnu_u1 || sve_s1; /* { dg-error {used vector type where scalar is required} } */ @@ -402,14 +403,14 @@ f (svuint8_t sve_u1, svint8_t sve_s1, /* Vector built-ins. */ - __builtin_shuffle (sve_u1, sve_u1, sve_u1); /* { dg-error {'__builtin_shuffle' last argument must be an integer vector} } */ - __builtin_shuffle (sve_u1, gnu_u1, gnu_u1); /* { dg-error {'__builtin_shuffle' arguments must be vectors} } */ - __builtin_shuffle (gnu_u1, sve_u1, gnu_u1); /* { dg-error {'__builtin_shuffle' arguments must be vectors} } */ - __builtin_shuffle (gnu_u1, gnu_u1, sve_u1); /* { dg-error {'__builtin_shuffle' last argument must be an integer vector} } */ + __builtin_shuffle (sve_u1, sve_u1, sve_u1); + __builtin_shuffle (sve_u1, gnu_u1, gnu_u1); /* { dg-error {'__builtin_shuffle' argument vectors must be of the same type} } */ + __builtin_shuffle (gnu_u1, sve_u1, gnu_u1); /* { dg-error {'__builtin_shuffle' argument vectors must be of the same type} } */ + __builtin_shuffle (gnu_u1, gnu_u1, sve_u1); __builtin_shuffle (gnu_u1, gnu_u1, gnu_u1); - __builtin_convertvector (sve_u1, svuint8_t); /* { dg-error {'__builtin_convertvector' first argument must be an integer or floating vector} } */ - __builtin_convertvector (gnu_u1, svuint8_t); /* { dg-error {'__builtin_convertvector' second argument must be an integer or floating vector type} } */ - __builtin_convertvector (sve_u1, gnu_uint8_t); /* { dg-error {'__builtin_convertvector' first argument must be an integer or floating vector} } */ + __builtin_convertvector (sve_u1, svuint8_t); + __builtin_convertvector (gnu_u1, svuint8_t); + __builtin_convertvector (sve_u1, gnu_uint8_t); __builtin_convertvector (gnu_u1, gnu_uint8_t); } diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/gnu_vectors_2.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/gnu_vectors_2.c index c05b16406a4..2e92b0dd766 100644 --- a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/gnu_vectors_2.c +++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/gnu_vectors_2.c @@ -13,13 +13,13 @@ f (svuint8_t sve_u1, svint8_t sve_s1, svuint8_t init_sve_u1 = 0; /* { dg-error {incompatible types when initializing type 'svuint8_t' using type 'int'} } */ svuint8_t init_sve_u2 = {}; - svuint8_t init_sve_u3 = { sve_u1 }; - svuint8_t init_sve_u4 = { gnu_u1 }; - svuint8_t init_sve_u5 = { sve_s1 }; - svuint8_t init_sve_u6 = { gnu_s1 }; - svuint8_t init_sve_u7 = { 0 }; /* { dg-error {incompatible types when initializing type 'svuint8_t' using type 'int'} } */ - svuint8_t init_sve_u8 = { sve_u1, sve_u1 }; /* { dg-warning {excess elements in scalar initializer} } */ - svuint8_t init_sve_u9 = { gnu_u1, gnu_u1 }; /* { dg-warning {excess elements in scalar initializer} } */ + svuint8_t init_sve_u3 = { sve_u1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ + svuint8_t init_sve_u4 = { gnu_u1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ + svuint8_t init_sve_u5 = { sve_s1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ + svuint8_t init_sve_u6 = { gnu_s1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ + svuint8_t init_sve_u7 = { 0 }; + svuint8_t init_sve_u8 = { sve_u1, sve_u1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ + svuint8_t init_sve_u9 = { gnu_u1, gnu_u1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ gnu_uint8_t init_gnu_u1 = 0; /* { dg-error {incompatible types when initializing type 'gnu_uint8_t'[^\n]* using type 'int'} } */ gnu_uint8_t init_gnu_u2 = {}; @@ -32,11 +32,11 @@ f (svuint8_t sve_u1, svint8_t sve_s1, /* Compound literals. */ (svuint8_t) {}; - (svuint8_t) { 0 }; /* { dg-error {incompatible types when initializing type 'svuint8_t' using type 'int'} } */ - (svuint8_t) { sve_u1 }; - (svuint8_t) { gnu_u1 }; - (svuint8_t) { sve_s1 }; - (svuint8_t) { gnu_s1 }; + (svuint8_t) { 0 }; + (svuint8_t) { sve_u1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ + (svuint8_t) { gnu_u1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ + (svuint8_t) { sve_s1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ + (svuint8_t) { gnu_s1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ (gnu_uint8_t) {}; (gnu_uint8_t) { 0 }; @@ -62,8 +62,8 @@ f (svuint8_t sve_u1, svint8_t sve_s1, (void) sve_u1; (svuint8_t) sve_u1; (svuint8_t) gnu_u1; - (svuint8_t) 0; /* { dg-error {conversion to non-scalar type requested} } */ - (svuint8_t) n; /* { dg-error {conversion to non-scalar type requested} } */ + (svuint8_t) 0; /* { dg-error {cannot convert a value of type 'int' to vector type '__SVUint8_t' which has different size} } */ + (svuint8_t) n; /* { dg-error {cannot convert a value of type 'int' to vector type '__SVUint8_t' which has different size} } */ (svint8_t) sve_u1; (svint8_t) gnu_u1; @@ -77,7 +77,7 @@ f (svuint8_t sve_u1, svint8_t sve_s1, /* Vector indexing. */ - sve_u1[0]; /* { dg-error {subscripted value is neither array nor pointer} } */ + sve_u1[0]; &sve_u1[0]; /* { dg-error {subscripted value is neither array nor pointer} } */ gnu_u1[0]; @@ -85,17 +85,17 @@ f (svuint8_t sve_u1, svint8_t sve_s1, /* Unary operators. */ - +sve_u1; /* { dg-error {wrong type argument to unary plus} } */ - -sve_u1; /* { dg-error {wrong type argument to unary minus} } */ - ~sve_u1; /* { dg-error {wrong type argument to bit-complement} } */ + +sve_u1; + -sve_u1; + ~sve_u1; !sve_u1; /* { dg-error {wrong type argument to unary exclamation mark} } */ *sve_u1; /* { dg-error {invalid type argument of unary '\*'} } */ __real sve_u1; /* { dg-error {wrong type argument to __real} } */ __imag sve_u1; /* { dg-error {wrong type argument to __imag} } */ - ++sve_u1; /* { dg-error {wrong type argument to increment} } */ - --sve_u1; /* { dg-error {wrong type argument to decrement} } */ - sve_u1++; /* { dg-error {wrong type argument to increment} } */ - sve_u1--; /* { dg-error {wrong type argument to decrement} } */ + ++sve_u1; + --sve_u1; + sve_u1++; + sve_u1--; +gnu_u1; -gnu_u1; @@ -111,60 +111,60 @@ f (svuint8_t sve_u1, svint8_t sve_s1, /* Vector-vector binary arithmetic. */ - sve_u1 + sve_u1; /* { dg-error {invalid operands to binary \+} } */ - sve_u1 - sve_u1; /* { dg-error {invalid operands to binary -} } */ - sve_u1 * sve_u1; /* { dg-error {invalid operands to binary \*} } */ - sve_u1 / sve_u1; /* { dg-error {invalid operands to binary /} } */ - sve_u1 % sve_u1; /* { dg-error {invalid operands to binary %} } */ - sve_u1 & sve_u1; /* { dg-error {invalid operands to binary \&} } */ - sve_u1 | sve_u1; /* { dg-error {invalid operands to binary \|} } */ - sve_u1 ^ sve_u1; /* { dg-error {invalid operands to binary \^} } */ - sve_u1 == sve_u1; /* { dg-error {invalid operands to binary ==} } */ - sve_u1 != sve_u1; /* { dg-error {invalid operands to binary !=} } */ - sve_u1 <= sve_u1; /* { dg-error {invalid operands to binary <=} } */ - sve_u1 < sve_u1; /* { dg-error {invalid operands to binary <} } */ - sve_u1 > sve_u1; /* { dg-error {invalid operands to binary >} } */ - sve_u1 >= sve_u1; /* { dg-error {invalid operands to binary >=} } */ - sve_u1 << sve_u1; /* { dg-error {invalid operands to binary <<} } */ - sve_u1 >> sve_u1; /* { dg-error {invalid operands to binary >>} } */ + sve_u1 + sve_u1; + sve_u1 - sve_u1; + sve_u1 * sve_u1; + sve_u1 / sve_u1; + sve_u1 % sve_u1; + sve_u1 & sve_u1; + sve_u1 | sve_u1; + sve_u1 ^ sve_u1; + sve_u1 == sve_u1; + sve_u1 != sve_u1; + sve_u1 <= sve_u1; + sve_u1 < sve_u1; + sve_u1 > sve_u1; + sve_u1 >= sve_u1; + sve_u1 << sve_u1; + sve_u1 >> sve_u1; sve_u1 && sve_u1; /* { dg-error {used vector type where scalar is required} } */ sve_u1 || sve_u1; /* { dg-error {used vector type where scalar is required} } */ - sve_u1 + gnu_u1; /* { dg-error {invalid operands to binary \+} } */ - sve_u1 - gnu_u1; /* { dg-error {invalid operands to binary -} } */ - sve_u1 * gnu_u1; /* { dg-error {invalid operands to binary \*} } */ - sve_u1 / gnu_u1; /* { dg-error {invalid operands to binary /} } */ - sve_u1 % gnu_u1; /* { dg-error {invalid operands to binary %} } */ - sve_u1 & gnu_u1; /* { dg-error {invalid operands to binary \&} } */ - sve_u1 | gnu_u1; /* { dg-error {invalid operands to binary \|} } */ - sve_u1 ^ gnu_u1; /* { dg-error {invalid operands to binary \^} } */ - sve_u1 == gnu_u1; /* { dg-error {invalid operands to binary ==} } */ - sve_u1 != gnu_u1; /* { dg-error {invalid operands to binary !=} } */ - sve_u1 <= gnu_u1; /* { dg-error {invalid operands to binary <=} } */ - sve_u1 < gnu_u1; /* { dg-error {invalid operands to binary <} } */ - sve_u1 > gnu_u1; /* { dg-error {invalid operands to binary >} } */ - sve_u1 >= gnu_u1; /* { dg-error {invalid operands to binary >=} } */ - sve_u1 << gnu_u1; /* { dg-error {invalid operands to binary <<} } */ - sve_u1 >> gnu_u1; /* { dg-error {invalid operands to binary >>} } */ + sve_u1 + gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 - gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 * gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 / gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 % gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 & gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 | gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 ^ gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 == gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 != gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 <= gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 < gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 > gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 >= gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 << gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 >> gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ sve_u1 && gnu_u1; /* { dg-error {used vector type where scalar is required} } */ sve_u1 || gnu_u1; /* { dg-error {used vector type where scalar is required} } */ - gnu_u1 + sve_u1; /* { dg-error {invalid operands to binary \+} } */ - gnu_u1 - sve_u1; /* { dg-error {invalid operands to binary -} } */ - gnu_u1 * sve_u1; /* { dg-error {invalid operands to binary \*} } */ - gnu_u1 / sve_u1; /* { dg-error {invalid operands to binary /} } */ - gnu_u1 % sve_u1; /* { dg-error {invalid operands to binary %} } */ - gnu_u1 & sve_u1; /* { dg-error {invalid operands to binary \&} } */ - gnu_u1 | sve_u1; /* { dg-error {invalid operands to binary \|} } */ - gnu_u1 ^ sve_u1; /* { dg-error {invalid operands to binary \^} } */ - gnu_u1 == sve_u1; /* { dg-error {invalid operands to binary ==} } */ - gnu_u1 != sve_u1; /* { dg-error {invalid operands to binary !=} } */ - gnu_u1 <= sve_u1; /* { dg-error {invalid operands to binary <=} } */ - gnu_u1 < sve_u1; /* { dg-error {invalid operands to binary <} } */ - gnu_u1 > sve_u1; /* { dg-error {invalid operands to binary >} } */ - gnu_u1 >= sve_u1; /* { dg-error {invalid operands to binary >=} } */ - gnu_u1 << sve_u1; /* { dg-error {invalid operands to binary <<} } */ - gnu_u1 >> sve_u1; /* { dg-error {invalid operands to binary >>} } */ + gnu_u1 + sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 - sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 * sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 / sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 % sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 & sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 | sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 ^ sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 == sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 != sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 <= sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 < sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 > sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 >= sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 << sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 >> sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ gnu_u1 && sve_u1; /* { dg-error {used vector type where scalar is required} } */ gnu_u1 || sve_u1; /* { dg-error {used vector type where scalar is required} } */ @@ -189,41 +189,41 @@ f (svuint8_t sve_u1, svint8_t sve_s1, /* Vector-scalar binary arithmetic. */ - sve_u1 + 2; /* { dg-error {invalid operands to binary \+} } */ - sve_u1 - 2; /* { dg-error {invalid operands to binary -} } */ - sve_u1 * 2; /* { dg-error {invalid operands to binary \*} } */ - sve_u1 / 2; /* { dg-error {invalid operands to binary /} } */ - sve_u1 % 2; /* { dg-error {invalid operands to binary %} } */ - sve_u1 & 2; /* { dg-error {invalid operands to binary \&} } */ - sve_u1 | 2; /* { dg-error {invalid operands to binary \|} } */ - sve_u1 ^ 2; /* { dg-error {invalid operands to binary \^} } */ - sve_u1 == 2; /* { dg-error {invalid operands to binary ==} } */ - sve_u1 != 2; /* { dg-error {invalid operands to binary !=} } */ - sve_u1 <= 2; /* { dg-error {invalid operands to binary <=} } */ - sve_u1 < 2; /* { dg-error {invalid operands to binary <} } */ - sve_u1 > 2; /* { dg-error {invalid operands to binary >} } */ - sve_u1 >= 2; /* { dg-error {invalid operands to binary >=} } */ - sve_u1 << 2; /* { dg-error {invalid operands to binary <<} } */ - sve_u1 >> 2; /* { dg-error {invalid operands to binary >>} } */ + sve_u1 + 2; + sve_u1 - 2; + sve_u1 * 2; + sve_u1 / 2; + sve_u1 % 2; + sve_u1 & 2; + sve_u1 | 2; + sve_u1 ^ 2; + sve_u1 == 2; + sve_u1 != 2; + sve_u1 <= 2; + sve_u1 < 2; + sve_u1 > 2; + sve_u1 >= 2; + sve_u1 << 2; + sve_u1 >> 2; sve_u1 && 2; /* { dg-error {used vector type where scalar is required} } */ sve_u1 || 2; /* { dg-error {used vector type where scalar is required} } */ - sve_u1 + uc; /* { dg-error {invalid operands to binary \+} } */ - sve_u1 - uc; /* { dg-error {invalid operands to binary -} } */ - sve_u1 * uc; /* { dg-error {invalid operands to binary \*} } */ - sve_u1 / uc; /* { dg-error {invalid operands to binary /} } */ - sve_u1 % uc; /* { dg-error {invalid operands to binary %} } */ - sve_u1 & uc; /* { dg-error {invalid operands to binary \&} } */ - sve_u1 | uc; /* { dg-error {invalid operands to binary \|} } */ - sve_u1 ^ uc; /* { dg-error {invalid operands to binary \^} } */ - sve_u1 == uc; /* { dg-error {invalid operands to binary ==} } */ - sve_u1 != uc; /* { dg-error {invalid operands to binary !=} } */ - sve_u1 <= uc; /* { dg-error {invalid operands to binary <=} } */ - sve_u1 < uc; /* { dg-error {invalid operands to binary <} } */ - sve_u1 > uc; /* { dg-error {invalid operands to binary >} } */ - sve_u1 >= uc; /* { dg-error {invalid operands to binary >=} } */ - sve_u1 << uc; /* { dg-error {invalid operands to binary <<} } */ - sve_u1 >> uc; /* { dg-error {invalid operands to binary >>} } */ + sve_u1 + uc; + sve_u1 - uc; + sve_u1 * uc; + sve_u1 / uc; + sve_u1 % uc; + sve_u1 & uc; + sve_u1 | uc; + sve_u1 ^ uc; + sve_u1 == uc; + sve_u1 != uc; + sve_u1 <= uc; + sve_u1 < uc; + sve_u1 > uc; + sve_u1 >= uc; + sve_u1 << uc; + sve_u1 >> uc; sve_u1 && uc; /* { dg-error {used vector type where scalar is required} } */ sve_u1 || uc; /* { dg-error {used vector type where scalar is required} } */ @@ -267,22 +267,22 @@ f (svuint8_t sve_u1, svint8_t sve_s1, /* Scalar-vector binary arithmetic. */ - 3 + sve_u1; /* { dg-error {invalid operands to binary \+} } */ - 3 - sve_u1; /* { dg-error {invalid operands to binary -} } */ - 3 * sve_u1; /* { dg-error {invalid operands to binary \*} } */ - 3 / sve_u1; /* { dg-error {invalid operands to binary /} } */ - 3 % sve_u1; /* { dg-error {invalid operands to binary %} } */ - 3 & sve_u1; /* { dg-error {invalid operands to binary \&} } */ - 3 | sve_u1; /* { dg-error {invalid operands to binary \|} } */ - 3 ^ sve_u1; /* { dg-error {invalid operands to binary \^} } */ - 3 == sve_u1; /* { dg-error {invalid operands to binary ==} } */ - 3 != sve_u1; /* { dg-error {invalid operands to binary !=} } */ - 3 <= sve_u1; /* { dg-error {invalid operands to binary <=} } */ - 3 < sve_u1; /* { dg-error {invalid operands to binary <} } */ - 3 > sve_u1; /* { dg-error {invalid operands to binary >} } */ - 3 >= sve_u1; /* { dg-error {invalid operands to binary >=} } */ - 3 << sve_u1; /* { dg-error {invalid operands to binary <<} } */ - 3 >> sve_u1; /* { dg-error {invalid operands to binary >>} } */ + 3 + sve_u1; + 3 - sve_u1; + 3 * sve_u1; + 3 / sve_u1; + 3 % sve_u1; + 3 & sve_u1; + 3 | sve_u1; + 3 ^ sve_u1; + 3 == sve_u1; + 3 != sve_u1; + 3 <= sve_u1; + 3 < sve_u1; + 3 > sve_u1; + 3 >= sve_u1; + 3 << sve_u1; + 3 >> sve_u1; 3 && sve_u1; /* { dg-error {invalid operands to binary \&\&} } */ 3 || sve_u1; /* { dg-error {invalid operands to binary \|\|} } */ @@ -307,60 +307,60 @@ f (svuint8_t sve_u1, svint8_t sve_s1, /* Mismatched types. */ - sve_u1 + sve_s1; /* { dg-error {invalid operands to binary \+} } */ - sve_u1 - sve_s1; /* { dg-error {invalid operands to binary -} } */ - sve_u1 * sve_s1; /* { dg-error {invalid operands to binary \*} } */ - sve_u1 / sve_s1; /* { dg-error {invalid operands to binary /} } */ - sve_u1 % sve_s1; /* { dg-error {invalid operands to binary %} } */ - sve_u1 & sve_s1; /* { dg-error {invalid operands to binary \&} } */ - sve_u1 | sve_s1; /* { dg-error {invalid operands to binary \|} } */ - sve_u1 ^ sve_s1; /* { dg-error {invalid operands to binary \^} } */ - sve_u1 == sve_s1; /* { dg-error {invalid operands to binary ==} } */ - sve_u1 != sve_s1; /* { dg-error {invalid operands to binary !=} } */ - sve_u1 <= sve_s1; /* { dg-error {invalid operands to binary <=} } */ - sve_u1 < sve_s1; /* { dg-error {invalid operands to binary <} } */ - sve_u1 > sve_s1; /* { dg-error {invalid operands to binary >} } */ - sve_u1 >= sve_s1; /* { dg-error {invalid operands to binary >=} } */ - sve_u1 << sve_s1; /* { dg-error {invalid operands to binary <<} } */ - sve_u1 >> sve_s1; /* { dg-error {invalid operands to binary >>} } */ + sve_u1 + sve_s1; + sve_u1 - sve_s1; + sve_u1 * sve_s1; + sve_u1 / sve_s1; + sve_u1 % sve_s1; + sve_u1 & sve_s1; + sve_u1 | sve_s1; + sve_u1 ^ sve_s1; + sve_u1 == sve_s1; + sve_u1 != sve_s1; + sve_u1 <= sve_s1; + sve_u1 < sve_s1; + sve_u1 > sve_s1; + sve_u1 >= sve_s1; + sve_u1 << sve_s1; + sve_u1 >> sve_s1; sve_u1 && sve_s1; /* { dg-error {used vector type where scalar is required} } */ sve_u1 || sve_s1; /* { dg-error {used vector type where scalar is required} } */ - sve_u1 + gnu_s1; /* { dg-error {invalid operands to binary \+} } */ - sve_u1 - gnu_s1; /* { dg-error {invalid operands to binary -} } */ - sve_u1 * gnu_s1; /* { dg-error {invalid operands to binary \*} } */ - sve_u1 / gnu_s1; /* { dg-error {invalid operands to binary /} } */ - sve_u1 % gnu_s1; /* { dg-error {invalid operands to binary %} } */ - sve_u1 & gnu_s1; /* { dg-error {invalid operands to binary \&} } */ - sve_u1 | gnu_s1; /* { dg-error {invalid operands to binary \|} } */ - sve_u1 ^ gnu_s1; /* { dg-error {invalid operands to binary \^} } */ - sve_u1 == gnu_s1; /* { dg-error {invalid operands to binary ==} } */ - sve_u1 != gnu_s1; /* { dg-error {invalid operands to binary !=} } */ - sve_u1 <= gnu_s1; /* { dg-error {invalid operands to binary <=} } */ - sve_u1 < gnu_s1; /* { dg-error {invalid operands to binary <} } */ - sve_u1 > gnu_s1; /* { dg-error {invalid operands to binary >} } */ - sve_u1 >= gnu_s1; /* { dg-error {invalid operands to binary >=} } */ - sve_u1 << gnu_s1; /* { dg-error {invalid operands to binary <<} } */ - sve_u1 >> gnu_s1; /* { dg-error {invalid operands to binary >>} } */ + sve_u1 + gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 - gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 * gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 / gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 % gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 & gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 | gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 ^ gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 == gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 != gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 <= gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 < gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 > gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 >= gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 << gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + sve_u1 >> gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ sve_u1 && gnu_s1; /* { dg-error {used vector type where scalar is required} } */ sve_u1 || gnu_s1; /* { dg-error {used vector type where scalar is required} } */ - gnu_u1 + sve_s1; /* { dg-error {invalid operands to binary \+} } */ - gnu_u1 - sve_s1; /* { dg-error {invalid operands to binary -} } */ - gnu_u1 * sve_s1; /* { dg-error {invalid operands to binary \*} } */ - gnu_u1 / sve_s1; /* { dg-error {invalid operands to binary /} } */ - gnu_u1 % sve_s1; /* { dg-error {invalid operands to binary %} } */ - gnu_u1 & sve_s1; /* { dg-error {invalid operands to binary \&} } */ - gnu_u1 | sve_s1; /* { dg-error {invalid operands to binary \|} } */ - gnu_u1 ^ sve_s1; /* { dg-error {invalid operands to binary \^} } */ - gnu_u1 == sve_s1; /* { dg-error {invalid operands to binary ==} } */ - gnu_u1 != sve_s1; /* { dg-error {invalid operands to binary !=} } */ - gnu_u1 <= sve_s1; /* { dg-error {invalid operands to binary <=} } */ - gnu_u1 < sve_s1; /* { dg-error {invalid operands to binary <} } */ - gnu_u1 > sve_s1; /* { dg-error {invalid operands to binary >} } */ - gnu_u1 >= sve_s1; /* { dg-error {invalid operands to binary >=} } */ - gnu_u1 << sve_s1; /* { dg-error {invalid operands to binary <<} } */ - gnu_u1 >> sve_s1; /* { dg-error {invalid operands to binary >>} } */ + gnu_u1 + sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 - sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 * sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 / sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 % sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 & sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 | sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 ^ sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 == sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 != sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 <= sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 < sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 > sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 >= sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 << sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gnu_u1 >> sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ gnu_u1 && sve_s1; /* { dg-error {used vector type where scalar is required} } */ gnu_u1 || sve_s1; /* { dg-error {used vector type where scalar is required} } */ @@ -402,14 +402,14 @@ f (svuint8_t sve_u1, svint8_t sve_s1, /* Vector built-ins. */ - __builtin_shuffle (sve_u1, sve_u1, sve_u1); /* { dg-error {'__builtin_shuffle' last argument must be an integer vector} } */ - __builtin_shuffle (sve_u1, gnu_u1, gnu_u1); /* { dg-error {'__builtin_shuffle' arguments must be vectors} } */ - __builtin_shuffle (gnu_u1, sve_u1, gnu_u1); /* { dg-error {'__builtin_shuffle' arguments must be vectors} } */ - __builtin_shuffle (gnu_u1, gnu_u1, sve_u1); /* { dg-error {'__builtin_shuffle' last argument must be an integer vector} } */ + __builtin_shuffle (sve_u1, sve_u1, sve_u1); + __builtin_shuffle (sve_u1, gnu_u1, gnu_u1); /* { dg-error {'__builtin_shuffle' argument vectors must be of the same type} } */ + __builtin_shuffle (gnu_u1, sve_u1, gnu_u1); /* { dg-error {'__builtin_shuffle' argument vectors must be of the same type} } */ + __builtin_shuffle (gnu_u1, gnu_u1, sve_u1); __builtin_shuffle (gnu_u1, gnu_u1, gnu_u1); - __builtin_convertvector (sve_u1, svuint8_t); /* { dg-error {'__builtin_convertvector' first argument must be an integer or floating vector} } */ - __builtin_convertvector (gnu_u1, svuint8_t); /* { dg-error {'__builtin_convertvector' second argument must be an integer or floating vector type} } */ - __builtin_convertvector (sve_u1, gnu_uint8_t); /* { dg-error {'__builtin_convertvector' first argument must be an integer or floating vector} } */ + __builtin_convertvector (sve_u1, svuint8_t); + __builtin_convertvector (gnu_u1, svuint8_t); + __builtin_convertvector (sve_u1, gnu_uint8_t); __builtin_convertvector (gnu_u1, gnu_uint8_t); } diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-1.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-1.c index 747bac464a5..9677b6535fd 100644 --- a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-1.c +++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-1.c @@ -86,7 +86,7 @@ statements (int n) /* Compound literals. */ (svint8_t) {}; - (svint8_t) { sve_sc1 }; + (svint8_t) { sve_sc1 }; /* { dg-error {incompatible types when initializing type 'signed char' using type 'svint8_t'} } */ (int) { sve_sc1 }; /* { dg-error {incompatible types when initializing type 'int' using type 'svint8_t'} } */ diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-2.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-2.c index 33cd21610ea..73828a5729f 100644 --- a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-2.c +++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-2.c @@ -85,7 +85,7 @@ statements (int n) /* Compound literals. */ (svint8_t) {}; - (svint8_t) { sve_sc1 }; + (svint8_t) { sve_sc1 }; /* { dg-error {incompatible types when initializing type 'signed char' using type 'svint8_t'} } */ (int) { sve_sc1 }; /* { dg-error {incompatible types when initializing type 'int' using type 'svint8_t'} } */ diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/attributes_7.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/attributes_7.c index edfadb8da38..7df9aaf45c6 100644 --- a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/attributes_7.c +++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/attributes_7.c @@ -47,25 +47,25 @@ f (int c) svbool_t sb; fixed_bool_t fb; - ss8 = ss8 + ss8; // { dg-error {invalid operands [^\n]* binary[^\n]*\+} } - ss8 = ss8 + fs8; // { dg-error {invalid operands [^\n]* binary[^\n]*\+} } - ss8 = ss8 + gs8; // { dg-error {invalid operands [^\n]* binary[^\n]*\+} } - ss8 += ss8; // { dg-error {invalid operands [^\n]* binary[^\n]*\+} } - ss8 += fs8; // { dg-error {invalid operands [^\n]* binary[^\n]*\+} } - ss8 += gs8; // { dg-error {invalid operands [^\n]* binary[^\n]*\+} } - - fs8 = fs8 + ss8; // { dg-error {invalid operands [^\n]* binary[^\n]*\+} } + ss8 = ss8 + ss8; + ss8 = ss8 + fs8; + ss8 = ss8 + gs8; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + ss8 += ss8; + ss8 += fs8; + ss8 += gs8; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + + fs8 = fs8 + ss8; fs8 = fs8 + fs8; - fs8 = fs8 + gs8; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } - fs8 += ss8; // { dg-error {invalid operands [^\n]* binary[^\n]*\+} } + fs8 = fs8 + gs8; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + fs8 += ss8; fs8 += fs8; - fs8 += gs8; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + fs8 += gs8; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ - gs8 = gs8 + ss8; // { dg-error {invalid operands [^\n]* binary[^\n]*\+} } - gs8 = gs8 + fs8; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gs8 = gs8 + ss8; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gs8 = gs8 + fs8; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ gs8 = gs8 + gs8; - gs8 += ss8; // { dg-error {invalid operands [^\n]* binary[^\n]*\+} } - gs8 += fs8; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} } + gs8 += ss8; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ + gs8 += fs8; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ gs8 += gs8; fs8 = ss8; From patchwork Fri Nov 29 03:54:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejas Belagod X-Patchwork-Id: 102063 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 58DF73858C53 for ; Fri, 29 Nov 2024 03:57:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 58DF73858C53 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=RfXUtEf3; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=RfXUtEf3 X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from DUZPR83CU001.outbound.protection.outlook.com (mail-northeuropeazlp170130004.outbound.protection.outlook.com [IPv6:2a01:111:f403:c200::4]) by sourceware.org (Postfix) with ESMTPS id 850603858C62 for ; Fri, 29 Nov 2024 03:54:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 850603858C62 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 850603858C62 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:c200::4 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1732852480; cv=pass; b=dsb67ZTUeo+kO0koc8Hf8gCN6yp64wq6xk+keozghIzoVzDqVY0teizfyy9HdaA0H51XRaiWLDjn57ckjG58yjVCCr7dzZyHpCHpyWhUBEVMXnsZgMxkQMtrsOgOYi6Ba2AjjCS9AFBmA0zS+75gVSnXCaPOiZSpeXP5vbnS7JA= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1732852480; c=relaxed/simple; bh=17DGLQBJ1ZyunaWXGYPllxA/ykG3NCtwn/ptZZMllE8=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=WQcoNvnQS3Y5VuHmfaOG8sJp9JXqIj3tO9k4D1dT6EAlUYvoOknI7Q4XD6ij6R/a2nzT9cb2KKYOJoKkBxpBjSq47NVoOdXju2n0FK8amniuCOZdVvh/mV/BhvO+f7Zvrcbhw81geIRRBXMoTck4Iwdo6RTqIwvUFcPTttD5lN0= ARC-Authentication-Results: i=3; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 850603858C62 ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=LMLvptXjR2NvPtA75Ljjqbqpe5fJy83TTq1HPmNecZv86hLA+8deUuOs9r+NnxKnSKkR1omEvU0feuZiTQNS8tBLskUlQv9DfMSTKQyFslcpDVBQZwRcnuqJolafeQ1AePXEdiiT/RCZTYqaZFcuFDydpmZW8vtM/gdxxZGcSnUmVMcNStTTDHZ21wshUwRv2RPrU3JWL6hRQNXVfaoE+dMKoSBYhuCO8LZFZzHy9OzC5sUhK9uhaqWZvvxejV3wLQSBBvf/IYTJVxOrLP5DyxbrKrUhrW040gmzvran3L6bsKO3ZCdI5EDjAw7/2rO6ZHigjFNHttvZ0HKKZRvkCA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=yK9RFdChNg6d5lLA5S6BwAFaSd7W+smM3z32C1xfq1s=; b=rTU1lyfucUBLqMWk16qmxWgKvzFflXoklGfzmL6yrFUXssk+lHYd2YJTxVA0UII/vV3AOWVnksoSW7k5W6OZFhq64hgT9H1lPp5NlJZWuoJl/BhmpzWPv6I7Oygnkrxk2b9pwhwx1xq+xXWtDtW52X5vyiJ+kKvmoQAUHlliw1YHwNYVc8gqnKKJO3yHnLsOPtRbxgRQn6oWuGjn2zBIPj+jDsE9JverzXOyFACihKzqkTDAmfDG/zxU+6h48+GmqYQpIrSMYXUdsCYNsbY4di8wY7heqwcgH2nGApJbPOZMyIQcUU8l0KhheXX1uLc2QuOJ16wY3RMJgNUkx7zyWQ== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yK9RFdChNg6d5lLA5S6BwAFaSd7W+smM3z32C1xfq1s=; b=RfXUtEf3NAij11DlGXSqsriSL0IRfHEgHJokC/SBTXdlZvrCBP8Ifpdvs+7x4IurNFDhcbIMamH45Naz/ZM8VKFyM4WjsXAXlsD+w/xgD3xC33pdaicB7Ltl7C/ebwsaBc29AqTNxloBN/1nFodktAl3h0jXohdJbmkRvSFbOzo= Received: from DB8PR04CA0021.eurprd04.prod.outlook.com (2603:10a6:10:110::31) by DB9PR08MB9561.eurprd08.prod.outlook.com (2603:10a6:10:452::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.14; Fri, 29 Nov 2024 03:54:36 +0000 Received: from DB1PEPF000509EB.eurprd03.prod.outlook.com (2603:10a6:10:110:cafe::5f) by DB8PR04CA0021.outlook.office365.com (2603:10a6:10:110::31) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8207.14 via Frontend Transport; Fri, 29 Nov 2024 03:54:36 +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=arm.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; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB1PEPF000509EB.mail.protection.outlook.com (10.167.242.69) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8207.12 via Frontend Transport; Fri, 29 Nov 2024 03:54:35 +0000 Received: ("Tessian outbound 5b75617ec243:v514"); Fri, 29 Nov 2024 03:54:34 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 21b5d8bb68ef7c87 X-TessianGatewayMetadata: 5puXTV+14FGoySBFu0Jobm1eQwoZN6MogccCSRtQz3GeEqt7md3/VvVIxCiDfaSo7kh3f+I09VSoFsTaAF12ctNS8CNrisaXGwhvRbPmzcE9Em9WB267Vd95vhEs/xhPbKgxLIoxVktG9kTlnA57OTw/7MLVxNfoH7EhRVG0qQ0= X-CR-MTA-TID: 64aa7808 Received: from L37809ae75bb7.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 8C86810B-7007-4449-9317-8EBDE65F6ABC.1; Fri, 29 Nov 2024 03:54:28 +0000 Received: from DUZPR83CU001.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id L37809ae75bb7.1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Fri, 29 Nov 2024 03:54:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BmHOrNp6IA712L3qZnijjrIpZLu+YYrlsHWRooemzB7/j+/ZFlpDMyU1m6Sgf0WhXXWi9oYzfXp/5IGdiWu0d42mFfdh5W0/xYl2bFYXVxMYSKwRiHf2S7HyFPLrTCVy2yEN0B94VkhslFVDHGcVzQf5kkpZLWvFK6GxaZZtNwTbHMGV4LsTzNE8n/DamA8n/W6peGQ4oR1IvR2vdw5/5mnGspBFy4Ln47gzs5fJv7PeohIzYArCKDVEuDnpoldlZ99QY0QO9z+EYitit4y96giyER2A880PpKyVZuqL6/ir4ukQmhGEqCzgU4v4tsVLaxPt3lmzeNJ31yCNy4E+LA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=yK9RFdChNg6d5lLA5S6BwAFaSd7W+smM3z32C1xfq1s=; b=Kqz3S1jALLq1kHmMiI84UZBF9fuMUXDlgOmKBzx2JxgnExBxmIPAWIBdMiIBgHHZxXPrYFSVTnx6WHgJtMSUP5yaSfGELTiUbFKNla4xKZGRAnD8hKR+e+x6Llk1xxBrTMxipB5JlCIi9QPOwbOqxLVR7rWZ7JP74nl8tIaU7IVU9b0JIx9F9BgFYPAJlGDpsllOR89zyIlVLWafapL3hom2eht+L+Yz76UNx5yNYaix9MPQcROKOhXd5t/NlOYmVJPpu+VoczWjsO+XWQLzLMNbEABlsMMZSRIsq3sHffA1Le7Rexf3Dxf7cJGulE56DbQvkbfNCYUrQR2f0/GIog== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yK9RFdChNg6d5lLA5S6BwAFaSd7W+smM3z32C1xfq1s=; b=RfXUtEf3NAij11DlGXSqsriSL0IRfHEgHJokC/SBTXdlZvrCBP8Ifpdvs+7x4IurNFDhcbIMamH45Naz/ZM8VKFyM4WjsXAXlsD+w/xgD3xC33pdaicB7Ltl7C/ebwsaBc29AqTNxloBN/1nFodktAl3h0jXohdJbmkRvSFbOzo= Received: from AM6P192CA0101.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:8d::42) by PAVPR08MB9481.eurprd08.prod.outlook.com (2603:10a6:102:319::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.13; Fri, 29 Nov 2024 03:54:25 +0000 Received: from AM4PEPF00027A5F.eurprd04.prod.outlook.com (2603:10a6:209:8d:cafe::55) by AM6P192CA0101.outlook.office365.com (2603:10a6:209:8d::42) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8207.13 via Frontend Transport; Fri, 29 Nov 2024 03:54:25 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by AM4PEPF00027A5F.mail.protection.outlook.com (10.167.16.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8207.12 via Frontend Transport; Fri, 29 Nov 2024 03:54:24 +0000 Received: from AZ-NEU-EX06.Arm.com (10.240.25.134) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 29 Nov 2024 03:54:23 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX06.Arm.com (10.240.25.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 29 Nov 2024 03:54:23 +0000 Received: from a078660.blr.arm.com (10.162.46.14) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Fri, 29 Nov 2024 03:54:21 +0000 From: Tejas Belagod To: CC: Tejas Belagod , , , , , Subject: [PATCH v3 8/8] cp: Fix another assumption in the FE about constant vector indices. Date: Fri, 29 Nov 2024 09:24:04 +0530 Message-ID: <20241129035404.3363162-9-tejas.belagod@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241129035404.3363162-1-tejas.belagod@arm.com> References: <20241129035404.3363162-1-tejas.belagod@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM4PEPF00027A5F:EE_|PAVPR08MB9481:EE_|DB1PEPF000509EB:EE_|DB9PR08MB9561:EE_ X-MS-Office365-Filtering-Correlation-Id: 83d503eb-e8ea-4329-0c4f-08dd102989ff x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|36860700013|1800799024|82310400026|376014; X-Microsoft-Antispam-Message-Info-Original: 9ZSXCG5tl7w2LxkMvFUcLOZuU3X49VJAjL5FP3Thz0e+tz9V/9FQK9DmLTLSfOtuo93Z4FVg1jhg/qHZkAJZp+e55BUBxTOaN/JDJp2n1pVLrEXa6g4+zSbZ4bMibND5hdL+vt23s+juAqBR5pxhZv5JpTUoT6kJkZoJVfRMkb5XwigxU+pSBJOrCR4WnYD4I2ar0VerbeghSQ9H5YT+doGN5DJVAJ1irTKuzSODxRqhzY9VWUe3/g3cYXFFlkiuh+O76a/+yHe1YB05F8o7y/HQ8EnEGSnLKlT/D4MCFVXj2eBcTMyUfIRyv8xm3dXXxY87PbO3kcbeY0gbJLrYKWXCDfdbILYv+pDaYxAmkTR3K169NN1A/MB7LRx+1yDZ+UfaqKFRq771NMIG2qWvVbABglZIarfF8dSlQbDWojUEYbeo7XSFRQ8fJJjc7BbTmwbQae9bsiVEZi02ILrCzjs5YtzctqyYVdv0WSauBDbwAXwtZmGkA7V7N+Pqd+IkQ3TpQkeH6dR7ceikX4R7VJ5nLQqV/RrorZC8zxLyKELdbyMHG5WoAwSFxd8HzGYT5EauFQbfpW6EsoPxLsn6cFz4k2wyujSJziEIewsMd8exIkjPeA/T6c28EKZJNEgLWLY+0WOVnBFEIFSavgNwTlObAqcUMclF9WAs05e+7p5ABsLIKde7sFxV0dEmh3ihExjVB1wDRU1Fxof8hkVQFRBMd4icRBpCLXY0gT5DBk94U0J8VH3NqWrN+0b5+EuzESKMDhP6/XfsUbzVtgqTeSaCX35qKmCaPhfk7vSiii3LwbbpRv/BT89tBBSiqO+DONtgXOjDpfocNmpcifTEshIwKyBdXP7hPAorVYkB3EJmYum9kWyc2iosFG9wlCEkKavofhr9td+ASqWky9QOQGpJt7NDyPK+woeGfoAmZGScEdfPkAJD8Df+3rsi+a7rmiRRltD5l105zuqzAm53RmC/aum4v8ihaXlNE7i/6pOi7wiuZ3AnXVmaxVqFMCh8vkm3rpYzDfPbxdjP9xPdFuVPiBx1REOKuXRgdJNbjL2w8P9rnEIwCZqzoQzAxIDQXQyJeJaGZF4LClldVyVA0H6Qfv14wpE+1WZKmeDHbHtx3aAV+ujU4d251J8OBnDD/jEVRvWd3paZZ+zhDBp3twY1xCbV99QmkOr8gwI0xrA+jayQanG+ZaFzqGm1gW0Vxohn2ygbQ3nX9pMxRaKuk6ELwqMrylBPkVbXRhCqg7ft/ewswoTQm7va4dLcBTIWaCi30fw4mQOTZlHPM9saBNc4XhPjUuJjcjdsL0jkFVnmGkXvDhJ8gfig5wICvm4drNoaIHljHSf9vNgY/DGQbr5z90q8byxZ00/Tt/oCQfM9C6xE/TSEGr4CcS3nXDYzXdVZFA7ClIhNdJ8oVAc3x2PY0nnQUj1kmSgIXyZ6vnq1buhfmSOW2c2Svd+EsCUM X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(36860700013)(1800799024)(82310400026)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR08MB9481 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:209:8d::42]; domain=AM6P192CA0101.EURP192.PROD.OUTLOOK.COM X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB1PEPF000509EB.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 652f56f1-dfcc-4126-fde9-08dd102983ac X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|35042699022|1800799024|82310400026|14060799003|376014; X-Microsoft-Antispam-Message-Info: Q6wR7N3OjpAe8NzDB7bNivM0qQNXqANwjmhqv8/wrmgKJ/1Nuu6NUCEsLvm3X3i70gSZll/iBX5iVMkteBtyW+jED1Tjb0F9CL/0ZvvlioiA0C+UIKdcIO6diqv6VQNIr5jwMZqp0FdkpifPpLhkRGQUCpbMzf0q1UqDDP1u0OQ0FXAaOdQNRnlkVDNRmJRCRwet2NF42vuoMOegAYN3wp5fgIfspkSrZe39GTCK6tMdZOzLKpYjcXSOmcKSYzwvNOnSNl/LpCxlI9D81ZbsRwI8DQws2ZE7bVHGMHoqSe7QGut0XruIyjccpLjBPZFeciZoocXj7F2UOTuyc3pzZ69GqS640I6cOmaM4jUcmBd8p8B2wYhYwI8B/2YZu/eR2B5ix3cfhZftqpj1JCNMFoyVPFJ7hgJPZj1jPJBs6sq/Kdt1/TXEdbaTDmiC1U6273D9U2MhsVROvXXKw7j71uV981PZA8qFyzQNuOLIW3n5cmnYumMxVdmHgUMEsnhqnUcUK3DG/RhLzJm0TkBMFpaieXmOCvo/PuNmhdMXO1CAvsHTr9FHd0xrLulBmnD2QrGEgOUhrIATLsbYLT93zkldQCcCJVXASSW6ONJTYf9MrA2Tu9/fR1BGe5W4oLxnyyR0LYghiV2Tss13odhew6bdh3OR/aTFhOPbGBs2uOwh7ol6kkbZRn8Qd2LvdlDxGtlIm1DMfsIjokiXDIVMzYzbMpUDce23vGB/lvjSzb7Irm9oOISwAgz7qOKHpRx2Z3FRsrzr3EXVmElmfniH4Szu/vpYUK+mXRRl43TSD1+BxbYgylG54wDx16BMS3dFBKGuBCYiJJ4dp46pgmWNDTB24Xn6j0kczu3m98q1OUmJb42VJS3QXLYlZw+P6lQWUFh7wlzfxjvVY+o/NGYUlFe/cp8ENGbH16Jj2tb68o1V3wAfZop8F7IsD20ynZ+7RL8gnqkaaaEJSc8YYQcxGknZx+8wkXIYocoEp47rkOx5UqI7RiKPbVX4gA0P7FdwrkYQe2gLIalHU/uY39nZp9y3NG2yEDD0ghRafOpddmvKZwJZlheUgC9PZkRseGYd4suqzcrOR0yhdvyy70RF+pr+kBp9pxB5AjdMsF8+06C8FPYn5eqcEiLOOYD/b4JtVnlbRVcK9NLV8le1SE5kA9/oOI8IasaWN0CXEwJ1avzo8sVYy4IPE9EBmSUvhxKkXVXDzGJJ73IRNE5N04Wtz5Pj9hk1kUbfNO5+VRRBZmBHBmVLB6ooDnqTHi0//NJtzCXH5pcrAtV9IwvpyowPh82NuCuK1JjwY3BHSnEu6pXb6VF+kcWku+5mYirXOJAak+29a8a75RZd2ACAcxUOYpIZoi2EyWIyNVppa6gJhialC8ta4O9gltCsheCXXWZ5t+CViK0imcX84k9bCXY2mpVs+wWkSS04dUDPO6E4eF1TilAd5pNu20KIjvjmFeqb 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:64aa7808-outbound-1.mta.getcheckrecipient.com; CAT:NONE; SFS:(13230040)(36860700013)(35042699022)(1800799024)(82310400026)(14060799003)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Nov 2024 03:54:35.1375 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 83d503eb-e8ea-4329-0c4f-08dd102989ff 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: DB1PEPF000509EB.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB9561 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NONE, TXREP, UNPARSEABLE_RELAY 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~patchwork=sourceware.org@gcc.gnu.org This patch adds a change to handle VLA's poly indices. gcc/ChangeLog: * cp/decl.cc (reshape_init_array_1): Handle poly indices. gcc/testsuite/ChangeLog: * g++.dg/ext/sve-sizeless-1.C: Update test to test initialize error. * g++.dg/ext/sve-sizeless-2.C: Likewise. --- gcc/cp/decl.cc | 11 ++++++++--- gcc/testsuite/g++.dg/ext/sve-sizeless-1.C | 11 +++++++++++ gcc/testsuite/g++.dg/ext/sve-sizeless-2.C | 9 +++++++++ 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/gcc/cp/decl.cc b/gcc/cp/decl.cc index 80485f0a428..4b6a5191a8a 100644 --- a/gcc/cp/decl.cc +++ b/gcc/cp/decl.cc @@ -6894,15 +6894,20 @@ reshape_init_array_1 (tree elt_type, tree max_index, reshape_iter *d, if (sized_array_p) { + poly_uint64 midx; /* Minus 1 is used for zero sized arrays. */ if (integer_all_onesp (max_index)) return new_init; - if (tree_fits_uhwi_p (max_index)) - max_index_cst = tree_to_uhwi (max_index); + if (tree_fits_poly_uint64_p (max_index)) + midx = tree_to_poly_uint64 (max_index); /* sizetype is sign extended, not zero extended. */ else - max_index_cst = tree_to_uhwi (fold_convert (size_type_node, max_index)); + midx = tree_to_poly_uint64 (fold_convert (size_type_node, max_index)); + + /* For VLA vectors, we restict the number of elements in the constructor + to lower bound of the VLA elements. */ + max_index_cst = constant_lower_bound (midx); } /* Loop until there are no more initializers. */ diff --git a/gcc/testsuite/g++.dg/ext/sve-sizeless-1.C b/gcc/testsuite/g++.dg/ext/sve-sizeless-1.C index adee37a0551..0a5c80b92b8 100644 --- a/gcc/testsuite/g++.dg/ext/sve-sizeless-1.C +++ b/gcc/testsuite/g++.dg/ext/sve-sizeless-1.C @@ -124,6 +124,8 @@ void thrower2 () throw (svint8_t); // { dg-error {cannot throw or catch SVE type void thrower3 () throw (svint8_t); // { dg-error {cannot throw or catch SVE type 'svint8_t'} "" { target c++98_only } } #endif +extern int bar (void); + // Main tests for statements and expressions. void @@ -161,6 +163,15 @@ statements (int n) svint8_t init_sve_sc5 = {}; svint8_t init_sve_sc6 = { sve_sc1 }; svint8_t init_sve_sc7 = { sve_sh1 }; // { dg-error {cannot convert 'svint16_t' to 'svint8_t'} } + svint32_t init_sve_vc1 = { 0, 1 }; + svint32_t init_sve_vc2 = { 0, bar () }; + svint32_t init_sve_vc3 = { bar (), n }; + svint32_t init_sve_vc4 = { 0, 1, 2, 3 }; + svint32_t init_sve_vc5 = { 0, 1, bar (), 3 }; + svint32_t init_sve_vc6 = { 0, 1, 2, 3, 4 }; // { dg-error {too many initializers for 'svint32_t'} } + svint32_t init_sve_vc7 = { 0, 1, 2, 3, bar () }; // { dg-error {too many initializers for 'svint32_t'} } + svint32_t init_sve_vc8 = { 0, 1, 2, 3, 4, 5 }; // { dg-error {too many initializers for 'svint32_t'} } + svint32_t init_sve_vc9 = { 0, bar (), 2, 3, 4, n }; // { dg-error {too many initializers for 'svint32_t'} } // Constructor calls. diff --git a/gcc/testsuite/g++.dg/ext/sve-sizeless-2.C b/gcc/testsuite/g++.dg/ext/sve-sizeless-2.C index 394ac1e4579..87937d060d2 100644 --- a/gcc/testsuite/g++.dg/ext/sve-sizeless-2.C +++ b/gcc/testsuite/g++.dg/ext/sve-sizeless-2.C @@ -161,6 +161,15 @@ statements (int n) svint8_t init_sve_sc5 = {}; svint8_t init_sve_sc6 = { sve_sc1 }; svint8_t init_sve_sc7 = { sve_sh1 }; // { dg-error {cannot convert 'svint16_t' to 'svint8_t'} } + svint32_t init_sve_vc1 = { 0, 1 }; + svint32_t init_sve_vc2 = { 0, bar () }; + svint32_t init_sve_vc3 = { bar (), n }; + svint32_t init_sve_vc4 = { 0, 1, 2, 3, 4, 5, 6, 7 }; + svint32_t init_sve_vc5 = { 0, 1, bar (), 3, 4, 5, n, 7 }; + svint32_t init_sve_vc6 = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; // { dg-error {too many initializers for 'svint32_t'} } + svint32_t init_sve_vc7 = { 0, 1, 2, 3, bar (), 5, 6, 7, n }; // { dg-error {too many initializers for 'svint32_t'} } + svint32_t init_sve_vc8 = { 0, bar (), 2, 3, 4, n, 5, 6, 7, 8, 9 }; // { dg-error {too many initializers for 'svint32_t'} } + svint32_t init_sve_vc9 = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; // { dg-error {too many initializers for 'svint32_t'} } // Constructor calls.