From patchwork Wed Nov 6 11:46:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejas Belagod X-Patchwork-Id: 2007452 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=Ov7q6yif; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=Ov7q6yif; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Xk3QG3XG5z1xxf for ; Wed, 6 Nov 2024 22:49:10 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A3AF03858D37 for ; Wed, 6 Nov 2024 11:49:08 +0000 (GMT) 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-vi1eur03on2061d.outbound.protection.outlook.com [IPv6:2a01:111:f403:260c::61d]) by sourceware.org (Postfix) with ESMTPS id 187B53858D21 for ; Wed, 6 Nov 2024 11:46:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 187B53858D21 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 187B53858D21 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:260c::61d ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1730893622; cv=pass; b=OJiBbaUvVbT2UO73B2W+93+v3FjRA3EOcI9Nno9Q90DfEV66aOnCo/qiIhR+l2LFlmXvSHkokTiI7YezdA7TO32JNS6KhaQ4wpLdBqfsYIZNn8uoAX4GDdXKasRYIs//MJDfQfbTKC93bS6/iCIs2rgXK6eQoafkB/woyWj4Ces= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1730893622; c=relaxed/simple; bh=bk5vw3iignwD6dR0WP8e8iwgd86B1z8d8rCR7ur9eSI=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=jzsYIdzL8OiWeoX2XruRsTIQ1hx/EjgwSNk0JtUQHKhpWsDbNbSEuhq9WihPHmjKHa3Anlt/y8JVjrW+iWIwwbm50Z4HY+c1vcUJjjSEorWlOZSOvEaafr4TkySrEIZjK1gV8zT7qKwN5XRGaz5dJ2Tcbt2WxJf5KoMlRNxuEoA= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=Nk4/EjEm9igB3ZOGehjBhcSnyWm2nP0WQuGE4+gp2SYZ2jgGCbCJcYo3IIoI7XF8fK14OsVW77OyhTpVVCLnF8+F53RH/OVh9ugMRYGnxO4b3Xf15rYZg9okEo2OsrIr6Ju9cRu4HYxlZBeIB7F5HwUSASOGV3XllnIelWWuxZIxDJU3ROJOrXHbvtzEnoXGXr/kckB43pcBkMxkHydnp5Dv6tP0uMNddY2CGhUeg8X9Csi7yx+5V040oWxpLF2Y8Mx2GNhmLMivsSEDlYi9ISe2w8b6aMVDZJ5doFtpAQ02RpQf1x4Fr4pT4Df4e/4/aEkl0dAVcg3w+DsQGDZqcw== 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=j+JaUmH+eiX3BjfHlWd2+47J8ABZ/A4wV6qlnZCzGoc=; b=gysSqkJBY7yt1lNLXJb8cXmh5/+A0UFSBwn1O7IPdLor3pK/Z0RcIsHaw/e5Ldm4TKzhn2OGAsQSfQAxb3Ny51u/nCoFj1KMm+8+c0SbrCALqu/nC6EkBfWNpUJLA2hr3nrnVsapsvaF5RP75RqBPn4mBHwvpZJG9IIxM39rxHYRgnsaJyqID7hLaOxpflwvKCUrbLtm8FqYJbHg6fDW3xWscWZEUW41pKWlPhVzzEKOL94sctRc9o+wCOqzUDAlL+ddE1ZzrBiLSqvDnDjtqLJ8k6Iaf87iEXnHM2d9EKWwmxNDcIHGCKWIvh43ZU12iCvXq90NrbxmjiGuVjvzCA== 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=j+JaUmH+eiX3BjfHlWd2+47J8ABZ/A4wV6qlnZCzGoc=; b=Ov7q6yifWd116DzVa1m6tpVYNOS+XQcHGtIjFP3QoTO/7bPM5HPq/SD54bo849onLHlQ0X1F3BA3qeXGoJ5zgdd2ImGIj5/SvWE1IzPh7cB8i//GDc7tTqdj8tN60Oa808LDrxgbgtSKp1ZqjZ63BVwFAPJbG8y0C5O2STa8pd4= Received: from DB8PR06CA0053.eurprd06.prod.outlook.com (2603:10a6:10:120::27) by AS8PR08MB10271.eurprd08.prod.outlook.com (2603:10a6:20b:629::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.18; Wed, 6 Nov 2024 11:46:51 +0000 Received: from DU2PEPF00028D10.eurprd03.prod.outlook.com (2603:10a6:10:120:cafe::b7) by DB8PR06CA0053.outlook.office365.com (2603:10a6:10:120::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.18 via Frontend Transport; Wed, 6 Nov 2024 11:46:50 +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 DU2PEPF00028D10.mail.protection.outlook.com (10.167.242.24) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8137.17 via Frontend Transport; Wed, 6 Nov 2024 11:46:50 +0000 Received: ("Tessian outbound 373849c2df5a:v490"); Wed, 06 Nov 2024 11:46:50 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 7a06b5ec83190e89 X-TessianGatewayMetadata: JKmFD/vurtZPkVoWp5zgGCmuXVthpX/Vc+u1H3GI3zeL3cRuj3WMgjyDJWEy4WGLcsciQyP8KI70p01pkdJUJEXkKHTLeVzyqs3KpCZdEXWXUMQR09e8KivTMIXi6MKcFOx5w/1yQU9wg6iihiOZ7xFUhgEVfnNYrFutzbslFXA= X-CR-MTA-TID: 64aa7808 Received: from L89a57bdd72bd.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 82DBFB38-1ABA-442B-A81B-3FB75C9FE123.1; Wed, 06 Nov 2024 11:46:43 +0000 Received: from EUR03-AM7-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id L89a57bdd72bd.1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Wed, 06 Nov 2024 11:46:43 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=i08gXLEa4zsgb4rOfvg67X80KY8W93lglfz6dm1znNNkYNXqKBx5LjlDmXPeJ8yXZSHK6c9sBiZ2ZeirQMGXFzO6obPHHpynoU59G7YcXB5ljTV0iTPOsTAEuc7JY9fDIufzlE5J1qEnqSyKplHVln3uNkmYTuXtbHzK6udSl5MkDvqvwISBGmEtDI0YAnEifF9xQ2XUjptPLBevFse6ntDJKSumEC8weSsLMstAKxUz9XjsKpaK4g7FA0rH+GuuQcV95+e8WBF/OVa4mt+DoyWkIR2HPHnCEkDwWWNyas+qoFZtLFMkhSBGGBU/yGmdTh9XTTZ/gjUIMP3R9CHGCg== 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=j+JaUmH+eiX3BjfHlWd2+47J8ABZ/A4wV6qlnZCzGoc=; b=bPgPd255TVJbpPOOsqCfPmzSFD7OqeNf/1mW3TkFnx2iN8ldt22ABBaDd8xQBK8zLSmGGg97L8lQOxr1+iccGwNZluHuHzfHGZ1QFMVPO7C1s95YDtad1wgGzHxMjMr1y+jXMOJ7QxZ7BjZzCNuRqBCKNcldczqhS935NfIq7z379D09Oq+mBajEKpQrjOCtVPaaECVQlC4ZszUQasLrXSkpinbqMEbH0c6f2f0gS3/MCg6gcPC7cdFCUn4WbHRYZm9loxgz3w9SZs9Dv7NwQPZMSti/EDImy5qMJF4Q7H0JjeJVUCudmmYGgblPwnmsaAavuC0LGqYv60Wey6iNEQ== 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=j+JaUmH+eiX3BjfHlWd2+47J8ABZ/A4wV6qlnZCzGoc=; b=Ov7q6yifWd116DzVa1m6tpVYNOS+XQcHGtIjFP3QoTO/7bPM5HPq/SD54bo849onLHlQ0X1F3BA3qeXGoJ5zgdd2ImGIj5/SvWE1IzPh7cB8i//GDc7tTqdj8tN60Oa808LDrxgbgtSKp1ZqjZ63BVwFAPJbG8y0C5O2STa8pd4= Received: from AS9PR06CA0395.eurprd06.prod.outlook.com (2603:10a6:20b:461::30) by DBBPR08MB10603.eurprd08.prod.outlook.com (2603:10a6:10:52b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.31; Wed, 6 Nov 2024 11:46:40 +0000 Received: from AMS0EPF00000190.eurprd05.prod.outlook.com (2603:10a6:20b:461:cafe::bb) by AS9PR06CA0395.outlook.office365.com (2603:10a6:20b:461::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.31 via Frontend Transport; Wed, 6 Nov 2024 11:46:40 +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 AMS0EPF00000190.mail.protection.outlook.com (10.167.16.213) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8137.17 via Frontend Transport; Wed, 6 Nov 2024 11:46:40 +0000 Received: from AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) 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; Wed, 6 Nov 2024 11:46:36 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 6 Nov 2024 11:46:35 +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; Wed, 6 Nov 2024 11:46:34 +0000 From: Tejas Belagod To: CC: Tejas Belagod , , , , Subject: [PATCH 10/10] cp: Fix another assumption in the FE about constant vector indices. Date: Wed, 6 Nov 2024 17:16:13 +0530 Message-ID: <20241106114613.2972987-11-tejas.belagod@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241106114613.2972987-1-tejas.belagod@arm.com> References: <20241106114613.2972987-1-tejas.belagod@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AMS0EPF00000190:EE_|DBBPR08MB10603:EE_|DU2PEPF00028D10:EE_|AS8PR08MB10271:EE_ X-MS-Office365-Filtering-Correlation-Id: 0ce25df8-b733-4032-63bd-08dcfe58b396 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|1800799024|36860700013|376014; X-Microsoft-Antispam-Message-Info-Original: pGscA+UGolh6jxHfjpsTaEERejGrIA43RD40xIShPQ1heRpC3lsZ5UlHejp4nz39T2zgUUuIMB115CTsKw1KSjot5wWSZe2zXnbwH6eiLyPmAm7SO2yo0IpQ2VyHbfCgitOpdhlZdjTlvq3zTTC2sMQnm2lGZskAE9HFc63CkA5RJ31ZDXN08VTsgC9T9RkHo40ce5LpMLETYqwJPR97wnsEott5KVEvTZ9vYaQTStxissEu854Xug4KbJfu7h6XDljBNWu64H+vEqy5hjZ0ZLkhHx66ptfehCyZgshs/9UDNs9Cey38bxnE/m5Mid52+fKmcpGedmPJDqdpvlo6Gnl2jQ4oCHQFv+jpDtWAe3ShoWPJCnpqacAAwGS+fp4GvfQRI++Yf6rof27+Sa6E3L78sWVLx7bnmND5qm5gDvEItfxm9NfRjWu7AS2FZSeazHt2oUV3QXBotuua7PPd2mbJm9nIbYXK71E7xkAO8bOpB8DUFCmWJqhNXzDfyOoercecu+ZDzbR6TZ5Yrj9KvTmI1xVozPmJD2+0e1YEjTdQLtjVACK22LFD/BxM5TjS7jTQD84PayQ0Gj1PbpSt3fPFSCkO/ivt48fz/cMowsZ3FzzqVoeTHzaKbqhG64MDiQKLmxqP/xD86g9JKT3aEt1I0BJFHlbZCFc5xsIEWLZapirdSNIG4LYhMIQt4DxwbSjGrYd4jrTTlLKFDX3gJr8bcMh/RD2TTnhDC6K9HSqSL3alKJYS7l3HFIPdd/FRS287gIjvkRnuC3Y+Gz+AndVU58B5GOSbogSFF/y8xl2sYeNYOw17F0GGdBHhjk/pi8v/WsMCUGe6pbXAuXGzt/7/ZTiizFg7yV0RXr7kg9FBz5ot1kOm1cLDPga+8O0YN+TcqEkA/d5l1o9lnI5mUL/FC0cBpFnizc+oZtRQaTyQpsDj7sHGR9cSIlz51ucr9EeSyfTKKPMF/MGZZcc07OTbPaqcDiB8lprshkYBoQYDRADkmEgl8Tw4UxC0YZemc1ju6UpwiDfPPSLDh/pW5nM78lY+Vab8KByB6dADDFhllo72+N4OvTsXsetnRc6b7Js8z8pQpGX5bYwKeIJ2km7Y0n98d059EK8b4YBy1ISV9NOn6O1dSDl6kN5t0MjzOQBy8TG1XJHtBZaivE1meguMQCw52JryNBwFfgDjnfMsUnnaMKi5EG/jqfRV/jzQTidcoPgWRv2TzXSDssCZ1heoyywdZJYnOg7Nx5TdGper60FXL6T1K7gX7pLTF/LqAJ2z2INZSzRacn2ks3pVRh+nAHm6lYwlRV5SgVrv7YqbB6EOqbTL6M3iUHi2Ss2k/Q/FCt/DCgY1svF0i0JzjfeL0oLPKyr435/I/CSUC0yrgop51+z7439hjpsLIGi9B4kk0bC8t53H9vFVb+v/TA== 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)(1800799024)(36860700013)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB10603 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:20b:461::30]; domain=AS9PR06CA0395.eurprd06.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: DU2PEPF00028D10.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 58347cf3-348a-44d9-c919-08dcfe58adbb X-Microsoft-Antispam: BCL:0; ARA:13230040|14060799003|35042699022|36860700013|376014|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: P3eEG1aBSrAGGSvMWleF844QYg4gBy3mR2InpKnA4a9D1lN4FAr+K6GD2PUogyA954etkNjNhy2g/W1CzRqe6FQM8/uXdMtXTH/T78OR/G36IOWNkrgg3G/FYkJrfO/moDICQ4COdUA1XimknMjwCcXd76RAzqyBRofpuqbHHpmOzly8FaFBCPvObBtapyGgEv378j5EW1aH7dcazflqZVqLVTGQVyP94u+HYPju3Y4GA52+51+Sdcv7lufY5THVOSmOVsdvEmqhqBFUiHsu/ODqE7WGoYddQXPl5iGd3dk1ACPbI++dv/lU9yZJ1VBAnC6+UcNkw6QU2WT410Bg1HEUGxL4orGiE8CfIOrMfX9Co5kY6T6nikm1L7aKANo+HroJGCjEwdN2c6en0ZDUoML+jO0MJxg9DdTK6I0lqsJSwQtv5Bg6UQL9p9uthfstrKioyxi50sQqSjtewEMxL6LQqxmhJ9VeHDIR/UL7zdjYXVBh2cdkTwwjImXVp2iA1zKHVe9C6DT+nkHt+IW6rY1gUkaoCtcjHAGkvC8ex3Ud2aJ/gMOQviMH+vgJCVONbW72PBXwQy2PH+0LWPjy4kLtxkR/zV14pJX+jvEeVE3h3lVib5Oaj7tyceFkvOjTsH99z8Pq7BHrwtikgmFNPQmz01bI/dU//Y/i4iAPeKwebTkxXoVApK1Zmu+t1wDNcy+ITuFaJ6jV2JEYKKE59ZpRt+MbxJ69uJLShLFhWfG/6loTvLmaShBiakqDL+HjPAQADOGOz8w4QBxfQFr97MkcieFTGT9xwql8OLFmmsrLDa7biHjfs4ky+9Sy2D4NT2oPs7+pdVS7FE7MW7t+pec2hjpW9hDjCXgpS0W70q2V9ubg65n21daDpkueGhuBGYWerSCD1qZaXjYhvqNtt2GwnJEvRM8ugxDFKarPsw1zzE7jUX5xsKR6WtBxTD8iANj8yEu/6ulyPUGzQ/fu+zLIGV2DPC3JCNBeddVjgsMZXieYNCPgcGp+WqYg6u78OLfVhGhf/1rmN7Ri1oNTUSCsFfK2smI5cDbuvppuKGArjcBy1GIVNOTrJ7uVtJ+l8ce20LXK4PE7oMtBBAfjDFRYN/OOi0T9IsXLXR/9FAj8ynfl+fFplFn5xEojf1hHak8miCsPJOzPc9EfzYrvd3HrA+gqWo9hW7/yQsoHZbPHqEvJ2EQF3RPvAJCRjcl38NKy0P+dDebFMDZFPnNYi9kGZd3Rx1q0DNehpIFUWz91CSkCfrFMt/soO7Qd+ZJdGcstOmjXCw2C5lIuYnU/3GBDz9GG+lVV6CDn8QwWeueiGSlPn8Ocqv3acLwlCSyC+UD2ZiTB53inbQ0vyU0rPdIqVhF2T78gsepVfp8rv6kmdsi03UfeHVXbtjbsTaI9mgK0VxDZckMwJwt/X1erGw== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230040)(14060799003)(35042699022)(36860700013)(376014)(82310400026)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Nov 2024 11:46:50.3322 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0ce25df8-b733-4032-63bd-08dcfe58b396 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: DU2PEPF00028D10.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB10271 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org 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 | 1 + gcc/testsuite/g++.dg/ext/sve-sizeless-2.C | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/gcc/cp/decl.cc b/gcc/cp/decl.cc index 0e4533c6fab..1b6bbadbe9d 100644 --- a/gcc/cp/decl.cc +++ b/gcc/cp/decl.cc @@ -6897,15 +6897,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..71e320c12e4 100644 --- a/gcc/testsuite/g++.dg/ext/sve-sizeless-1.C +++ b/gcc/testsuite/g++.dg/ext/sve-sizeless-1.C @@ -161,6 +161,7 @@ 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, 2, 3, 4, 5 }; // { 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 0b86d9e8217..1228bde85bc 100644 --- a/gcc/testsuite/g++.dg/ext/sve-sizeless-2.C +++ b/gcc/testsuite/g++.dg/ext/sve-sizeless-2.C @@ -161,6 +161,7 @@ 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, 2, 3, 4, 5, 6, 7, 8 }; // { dg-error {too many initializers for 'svint32_t'} } // Constructor calls.