Message ID | patch-18055-tamar@arm.com |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp3869097vqy; Tue, 5 Dec 2023 20:03:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IHFrUD2XuHxEYG0tUNcRmuCDLSPJThYCYyy9sD4OcBJW/jCPXwlRwofbVPkz0cNeKv9Jc6a X-Received: by 2002:ac8:7f81:0:b0:423:75a2:331b with SMTP id z1-20020ac87f81000000b0042375a2331bmr356302qtj.59.1701835421923; Tue, 05 Dec 2023 20:03:41 -0800 (PST) ARC-Seal: i=4; a=rsa-sha256; t=1701835421; cv=pass; d=google.com; s=arc-20160816; b=rGmVeeI7Ibl+frV35R2pUyT0UEVzgFqJjrFKnA5kUWegMmCnBsDYSS4oP/5FB30omO +OYDsamOnN6beV67OOF6KXnDFCIwKjn9HY3jhpy5LQmSVoOZC6vJfWDPEFY/0M3dTRiY 9ewH3X0vf+g1vxBPl4qLhrd+JJyQ6UC9A28rT+uzCYnnB2xtR1gia4tyQuKcaYygSw/h N/Jh6m7EpZM/xwceYUlKYOqbD1kEd4Yk7KuLJDYvZC+FkE1ltNkJXqHwOaU8X5i2m3mk JcN1siggCHqSktaQ9xM3aMeLkxBst45aAB3wIT+zCDCWNt3R+UeLppRtHJ7sKFhDzMO+ OmdA== ARC-Message-Signature: i=4; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:original-authentication-results :nodisclaimer:mime-version:content-disposition:message-id:subject:cc :to:from:date:authentication-results-original:dkim-signature :dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=8Edo5IfG8+zt/n2TGxjDLBF14D3c0g9iLKsgUqlm34E=; fh=6lLuKcPp5JwcfhLsQ40FQN1vJS1KxlKbf2GiViQwbCM=; b=sEOrv+LnoXZd+CJ19oFHojTtrZtpvetSyWn02k+NfXScMH+EPuc0byzUEgMgA23BBR pf9ZuAfXkf2ynJhfwM4kfB5P/bExc39HirjiCmGD+Orjf10wcV0K83i5mvtpR83Iuzvq lqcWU4mOJ1mysRHzXbXjUXy34AaRWkHGjE06V4u0XzjCEewaHu+I4eie66VyFDEaZaDg R+YZfHgM+MSUb/iSmQ4HDQMOK0iZdxZV9Fnsd3CzqgdVAhlNBshTPy7UkAzF1lb/Zkdw nAswF+Nx0XpjWGsvSPGX+SVtTWN/DMaRlFkbZ8f7uMeZXhfTeB4wAD9qLZs1s2Gqn1V8 BIvA== ARC-Authentication-Results: i=4; mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=Yz0ZT9oe; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=Yz0ZT9oe; arc=pass (i=3); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id f12-20020ac85d0c000000b0042548d75577si9406564qtx.317.2023.12.05.20.03.41 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 20:03:41 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=Yz0ZT9oe; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=Yz0ZT9oe; arc=pass (i=3); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id ADCD1385840B for <ouuuleilei@gmail.com>; Wed, 6 Dec 2023 04:03:41 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2050.outbound.protection.outlook.com [40.107.249.50]) by sourceware.org (Postfix) with ESMTPS id B5859385840B for <gcc-patches@gcc.gnu.org>; Wed, 6 Dec 2023 04:03:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B5859385840B 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 B5859385840B Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.249.50 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1701835398; cv=pass; b=FYtyHon2E40qDtF4N4JWX4gfftWxV9fk3EwYhk10dKxPXmR4+gbsuAiDtrneLG0pc+mogeWI+ZKUg28YfPsD5/Njw096HW0Lnq0KlPg2w0y/cMW8WbHdegkXps/tfGMaApq7uK6ze5LfvgeZzmLOtUNJDYnsGfATIUkwDAikPuw= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1701835398; c=relaxed/simple; bh=c4IlpeOsIyhOS5t6vKRjclBovremTOil94WEoQ2AFY4=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=buoW6UeZJHgYQGSniX7ikTlijE1J3RZsa5zHZoOhpha8PSE+P3S0PPb2nE1eND4btTuf0w60b2agcJDReAY2q3o+90tSjArxzDvAoulS7ym9hksxhFh0n0CYbleVJvLh9ir3NnYhwAmNrZiDVAQdRZ+vK5KqMRCaRW/OGMRU6DM= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=LARIUPXtXpclMH2RH2A1aXvpVc/8Ydro7yTPSPN09aRyGOvKYjBc4tc7MxS7EQ59FeZuJSGTqlL/K7fn3vbPhcKLlGVGQt9NNCfziI8YbhYPCm/aURtQrJXQO4l+QC9c/4erQmlYvLKPr6t/WuIprU7wkzfrsB5OzU6gND9NB0bZIUB2fZorZ8ElSWae1/Q7sJpMXY3IvBVQcAnRZkt1A5ac6L3UqZ1tURewNEF1u+goFzKT4HxptyVYoFddG/CnAXZGjE7rfCIziYS4ljFmIdxTEk89OjiBxj4a2eoexEY49ZmTUdFL7fxY7gv9yDmS3DtD4tKU4jBZH6mXmLk/jQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8Edo5IfG8+zt/n2TGxjDLBF14D3c0g9iLKsgUqlm34E=; b=Vtx06k+/7cx0qtJ3dVea7VL2FQZ/A1MCg0iTFWYMe0TDl6yD4QyijqG2ProEyywwY7+cDggNq4CPgUbQAKmRDafvi1CkbShAR8V3zN86Nv0C07qpXHacgJljdkD8R9ZvlF+g1RgIF6dHKuiFLaX0mR5wLro0akWY2hz8spYczdZYQ1gPqOzpLpsBVZos+09jRN7clsYcPFxhe0038G9VZ1TMS96eaEBjnsuw9rLhJAyb+2aC8O/Ppy60OjtFDrmrja1sA6vGdio5a2AKqjGdzeFDwzWfRS6aV4oYnWD0eSN/i42+PWBhJtvnunGcvjSrDfR8OCVGonT5Ai/lQSFCCA== 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=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8Edo5IfG8+zt/n2TGxjDLBF14D3c0g9iLKsgUqlm34E=; b=Yz0ZT9oexUJw0fa0V+3mapGPWCOwfhHWUIbJeuyJ7+GJZwo3sHyd4SGQnfS6xPnSJPYQRoTRopR6wV9YWID0Gfv8koE5RhL/B9rUtcPuVVra+Y7RNGdlp1G18kw5CDgxMeAdLmencZTy7wyXxPxVKVLRV7cY43mMcqPZsv742Cs= Received: from AM4PR07CA0022.eurprd07.prod.outlook.com (2603:10a6:205:1::35) by PA4PR08MB7644.eurprd08.prod.outlook.com (2603:10a6:102:262::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.34; Wed, 6 Dec 2023 04:03:13 +0000 Received: from AMS0EPF00000199.eurprd05.prod.outlook.com (2603:10a6:205:1:cafe::dd) by AM4PR07CA0022.outlook.office365.com (2603:10a6:205:1::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.24 via Frontend Transport; Wed, 6 Dec 2023 04:03:13 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AMS0EPF00000199.mail.protection.outlook.com (10.167.16.245) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.20 via Frontend Transport; Wed, 6 Dec 2023 04:03:13 +0000 Received: ("Tessian outbound 8289ea11ec17:v228"); Wed, 06 Dec 2023 04:03:13 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 78d2ab06de97f5c7 X-CR-MTA-TID: 64aa7808 Received: from f9e45d3fc7a8.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id BB06CEF3-4C58-4FEB-80F4-B1AA1625DEFE.1; Wed, 06 Dec 2023 04:03:06 +0000 Received: from EUR01-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id f9e45d3fc7a8.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 06 Dec 2023 04:03:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SryekKCMFI2iCXwuhEwi6x0V12qkgr0Mpgki5gyUK+ZF4LFlw1OT/oPPkF61lD3ukSvew6Xok1JrFaxZ3slgA/f6CNA/y02lhnXIxE4W0IODdjixUmHe6snT2JWQOLRzrnHcJkzRTKRN4xXVcXPZHw/rPOcGdHxlUI7zzJ/sBIg0Ym0UBiORdkHTbYbwMaFH/Pf+BoU6v6QSLbIaKvGT/s7jWcHPn1ni8XwUWBhZtmi7oC0wRXDo8L537hWCpe+nmm/ftM61XQf9QTRNWkFeq7DjT0f/XevSfgAO0p1usTTmfm6rRzlDYhrvi3WetBD26HSLVqAjsqihYKR+q3T+1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8Edo5IfG8+zt/n2TGxjDLBF14D3c0g9iLKsgUqlm34E=; b=cIUX9fmkPFH63ePEpPqSk2LPmXr/Le6wJyRcjXkMGVQJryYb9O7gK7R+A8ONAfKJmYDEYjBuU8sR96WxcVX1NSQCqg9UsEnqvv4ZZ/hsNxeyXji9NqPwI70RldVaIQejGoj1RGxrtZ+TcUyt8K+5SPkdW9AAb8BMtRrV6zB3foltccF6d8ugEyO7zxkyhrcsI5Wau4oGU8oaTC4CA/dd/Iqu5h75J0wRhyeq0w9tAeY93ps5XmhhekR+eXQ59N4iAItXqGKLUtRAk/7TGHWiGY/OEipGOR5jCbtwjrDOfqsNtFu4ilLcVSr75bdJBWonhZG/xA5ps0t///ZVJqY6gQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8Edo5IfG8+zt/n2TGxjDLBF14D3c0g9iLKsgUqlm34E=; b=Yz0ZT9oexUJw0fa0V+3mapGPWCOwfhHWUIbJeuyJ7+GJZwo3sHyd4SGQnfS6xPnSJPYQRoTRopR6wV9YWID0Gfv8koE5RhL/B9rUtcPuVVra+Y7RNGdlp1G18kw5CDgxMeAdLmencZTy7wyXxPxVKVLRV7cY43mMcqPZsv742Cs= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) by DU2PR08MB10263.eurprd08.prod.outlook.com (2603:10a6:10:491::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.34; Wed, 6 Dec 2023 04:03:02 +0000 Received: from VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::9679:2ab0:99c6:54a3]) by VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::9679:2ab0:99c6:54a3%6]) with mapi id 15.20.7046.034; Wed, 6 Dec 2023 04:03:02 +0000 Date: Wed, 6 Dec 2023 04:03:00 +0000 From: Tamar Christina <tamar.christina@arm.com> To: gcc-patches@gcc.gnu.org Cc: nd@arm.com, rguenther@suse.de, jlaw@ventanamicro.com Subject: [PATCH]middle-end: correct loop bounds for early breaks and peeled vector loops Message-ID: <patch-18055-tamar@arm.com> Content-Type: multipart/mixed; boundary="eNAhNT40n5Ob+m3g" Content-Disposition: inline X-ClientProxiedBy: LO4P123CA0387.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18f::14) To VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB5325:EE_|DU2PR08MB10263:EE_|AMS0EPF00000199:EE_|PA4PR08MB7644:EE_ X-MS-Office365-Filtering-Correlation-Id: 07374f62-d068-4ba4-3fe3-08dbf61044be x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 2VQuhTt3zj3erkd0J6J/O3hgsd/cICCaYN1dbdYA0+lFbeBNRpJF/D/FFRNkWzkAjgiVu+sABsbaJeKPg5c9ix9xwPFblm7sV1Xs6UT+eWVZKKUF8otyae5EuqdeXiA2ifutDlMOCTmhih2mdIAORHAQ88+zVpy2nlf9pKZSI6jqr4ABTQhPhqfCHzBGSXAFC7geqk+7nDvYY8OXa4eg8AvcWPxGGJoIstO65tOsTKUZC8fw4pjju58msMwCJd9scpk/VYAE9wRRhAna2lDYW8Ecbv+uHERLyelAaZCq2nLb14VXREZeHN5FC+uevoGKDo7g8Xpb4drELnqLS6dOQwgAMYND9yCxNeEEjgs15+doggzUk6RTOzmsTHVaEfqbZ8I2mnXl9/XyhYggCbgWHIkGSpfBNx/kQdrzXihKnMk8Bd4fnmf5Y8rXjsVrUvlSlJjv7WlpHc4h5Rt7TG6q4DCII5Cevgyb9kuUgsc1DrBUmAKgHm0xVjFEBuPIKnpPjAJTm7j8DCDB/o1VEve358gVpvtS3JPe5TZy5J7Sp7digh2xAitFwC4//yFfyj1LQg+6tdEyZZpJ1eeQcsIsn0BuK3XoRETt/dX1w87ONriK2+iRet9vNqO6b/VOsPvHwq1Vf03jMYddxj/YkG+ckQ== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR08MB5325.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(396003)(366004)(136003)(39860400002)(346002)(376002)(230922051799003)(64100799003)(451199024)(1800799012)(186009)(44832011)(2906002)(5660300002)(235185007)(36756003)(86362001)(41300700001)(6506007)(478600001)(33964004)(6486002)(44144004)(6512007)(38100700002)(83380400001)(26005)(2616005)(4743002)(8676002)(4326008)(8936002)(6916009)(66946007)(66476007)(66556008)(316002)(4216001)(2700100001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR08MB10263 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AMS0EPF00000199.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 4dbcc1a5-909b-42e8-c423-08dbf6103e25 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 35p4gvOA9Ia4i0OpS+k47hwUwO40miR9mzwlBwkwkrUpR7TU0FOqN9ZwPIKsxA6qUjFAJ1dS1QVfhNXCAb5vgEGpZmknaGvLEsjqtbM8Bj2g+phNmJ/FSY6KqxMxYSSBR4SruixSl5a6BG8pJ3v6pq7BCBGtj1nQB/6OG4L5RY5oihWXXJnVBTSupsQUGNn1O8JIazJSi+AgkUBoNRkMEWl9sgjhqP0Mx8XGLMM8GDEAgFc4QZ6c8k0nQQ/pJHWxxHtp6hxa7G8Qef76XuiF8rpStDscHE2bwaepvnO4atb8+V1MzU4BSHJ2AlhKMqkccLIC9ybkcdLwyY9BQ5G3tDxKI9qzL1pT7JbkCt2cqtR253hqoes9e2kGTybSRpFWrau4D0kOKIkmHVZkY1UUOsI0eSOGmo3CE2B3yRPiApHbUyFEEPptzhbuGFs8N59s5cPK3655pZU6I558oFmmpBjJUbkSHbYT6b29qVoMMtbfO63Z2Mlv59TuNw6C1aONGdO3/2CvI9uEE6s1Upj6uuxwUDBDwHrYqzVq69cc0wk9mvWxcUtHoviZumSBisLfgqnhWjC2/7WkotC2Qn71ck4L/+fbo8r5NaidnwIJbDQOZo4hOWaAT27rWGoYLpdq7TlD2WMo0fi3dhecDU9WQ73jV/AL/uTwJveTIfBfP+iLe1llfQ7drboQgKsO6RpvB4HwpnbmCsPNewC/+RXm9Y99YQ77N70WlLDomOWgfNVIftLijE5YKc5NwxztdVosXW3z9gqKCd14SPuv0aUQ76yUDfqoCvzasvVITlFkd+s= 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:(13230031)(4636009)(346002)(396003)(376002)(136003)(39860400002)(230922051799003)(82310400011)(451199024)(64100799003)(186009)(1800799012)(36840700001)(46966006)(40470700004)(4326008)(36756003)(41300700001)(5660300002)(235185007)(2906002)(40460700003)(44832011)(86362001)(82740400003)(83380400001)(356005)(47076005)(81166007)(6506007)(478600001)(44144004)(33964004)(6486002)(336012)(26005)(107886003)(2616005)(4743002)(6512007)(40480700001)(70586007)(6916009)(36860700001)(8676002)(8936002)(316002)(70206006)(4216001)(2700100001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Dec 2023 04:03:13.5816 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 07374f62-d068-4ba4-3fe3-08dbf61044be 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: AMS0EPF00000199.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB7644 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE, 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784503779144626476 X-GMAIL-MSGID: 1784503779144626476 |
Series |
middle-end: correct loop bounds for early breaks and peeled vector loops
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Tamar Christina
Dec. 6, 2023, 4:03 a.m. UTC
Hi All, While waiting for reviews I've continued to run more test. In this case this was one found running 32-bit systems. While we calculate the right latch count for the epilog, the vectorizer overrides SCEV and so unrolling goes wrong. This updates the bounds for the case where we've peeled a vector iteration. Testcase in early break testsuite adjusted to test for this and I'll merge this commit in the main one. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: * tree-vect-loop-manip.cc (vect_do_peeling): Adjust bounds. --- inline copy of patch -- diff --git a/gcc/tree-vect-loop-manip.cc b/gcc/tree-vect-loop-manip.cc index 4edde4443ecd98775972f39b3fe839255db12b04..7d48502e2e46240553509dfa6d75fcab7fea36d3 100644 -- diff --git a/gcc/tree-vect-loop-manip.cc b/gcc/tree-vect-loop-manip.cc index 4edde4443ecd98775972f39b3fe839255db12b04..7d48502e2e46240553509dfa6d75fcab7fea36d3 100644 --- a/gcc/tree-vect-loop-manip.cc +++ b/gcc/tree-vect-loop-manip.cc @@ -3457,6 +3457,12 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree niters, tree nitersm1, if (bound_scalar.is_constant (&bound)) { gcc_assert (bound != 0); + /* Adjust the upper bound by the extra peeled vector iteration if we + are an epilogue of an peeled vect loop and not VLA. For VLA the + loop bounds are unknown. */ + if (LOOP_VINFO_EARLY_BREAKS_VECT_PEELED (loop_vinfo) + && vf.is_constant ()) + bound += vf.to_constant (); /* -1 to convert loop iterations to latch iterations. */ record_niter_bound (epilog, bound - 1, false, true); scale_loop_profile (epilog, profile_probability::always (),
Comments
On Wed, 6 Dec 2023, Tamar Christina wrote: > Hi All, > > While waiting for reviews I've continued to run more test. > In this case this was one found running 32-bit systems. > > While we calculate the right latch count for the epilog, > the vectorizer overrides SCEV and so unrolling goes wrong. > > This updates the bounds for the case where we've peeled a > vector iteration. > > Testcase in early break testsuite adjusted to test for this > and I'll merge this commit in the main one. > > Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. > > Ok for master? OK. > Thanks, > Tamar > > gcc/ChangeLog: > > * tree-vect-loop-manip.cc (vect_do_peeling): Adjust bounds. > > --- inline copy of patch -- > diff --git a/gcc/tree-vect-loop-manip.cc b/gcc/tree-vect-loop-manip.cc > index 4edde4443ecd98775972f39b3fe839255db12b04..7d48502e2e46240553509dfa6d75fcab7fea36d3 100644 > --- a/gcc/tree-vect-loop-manip.cc > +++ b/gcc/tree-vect-loop-manip.cc > @@ -3457,6 +3457,12 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree niters, tree nitersm1, > if (bound_scalar.is_constant (&bound)) > { > gcc_assert (bound != 0); > + /* Adjust the upper bound by the extra peeled vector iteration if we > + are an epilogue of an peeled vect loop and not VLA. For VLA the > + loop bounds are unknown. */ > + if (LOOP_VINFO_EARLY_BREAKS_VECT_PEELED (loop_vinfo) > + && vf.is_constant ()) > + bound += vf.to_constant (); > /* -1 to convert loop iterations to latch iterations. */ > record_niter_bound (epilog, bound - 1, false, true); > scale_loop_profile (epilog, profile_probability::always (), > > > > >
--- a/gcc/tree-vect-loop-manip.cc +++ b/gcc/tree-vect-loop-manip.cc @@ -3457,6 +3457,12 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree niters, tree nitersm1, if (bound_scalar.is_constant (&bound)) { gcc_assert (bound != 0); + /* Adjust the upper bound by the extra peeled vector iteration if we + are an epilogue of an peeled vect loop and not VLA. For VLA the + loop bounds are unknown. */ + if (LOOP_VINFO_EARLY_BREAKS_VECT_PEELED (loop_vinfo) + && vf.is_constant ()) + bound += vf.to_constant (); /* -1 to convert loop iterations to latch iterations. */ record_niter_bound (epilog, bound - 1, false, true); scale_loop_profile (epilog, profile_probability::always (),