middle-end: don't pass loop_vinfo to vect_set_loop_condition during prolog peeling [PR111866]
Message ID | patch-17865-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:a05:612c:2010:b0:403:3b70:6f57 with SMTP id fe16csp965680vqb; Fri, 20 Oct 2023 03:51:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEEiPWFo52vao3CY9h9I11OCBIgo50zCjXrKoWOoYZI1WiYHjooUhiW/slVw9R2PH5mpnVm X-Received: by 2002:a05:622a:1444:b0:417:b970:f2a4 with SMTP id v4-20020a05622a144400b00417b970f2a4mr1523515qtx.1.1697799067427; Fri, 20 Oct 2023 03:51:07 -0700 (PDT) Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id o9-20020a05622a138900b004198b50a2c6si1111149qtk.459.2023.10.20.03.51.07 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 03:51:07 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=tRI4KkYo; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=tRI4KkYo; arc=fail (previous hop failed); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 338683858416 for <ouuuleilei@gmail.com>; Fri, 20 Oct 2023 10:51:07 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2045.outbound.protection.outlook.com [40.107.104.45]) by sourceware.org (Postfix) with ESMTPS id C35913858D39 for <gcc-patches@gcc.gnu.org>; Fri, 20 Oct 2023 10:50:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C35913858D39 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 C35913858D39 Authentication-Results: server2.sourceware.org; arc=fail smtp.remote-ip=40.107.104.45 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1697799041; cv=fail; b=HGhDcRRUfXCWC8G0IvjdV9xShQaPpzcASvAPdEgpgzrwSlioSG4WW39IWTGJ5US56tnsh8WrQJ/wXMOh9SNxa/A8g24BMqe6Kd9OzUgovC53dfbtBYuIrkdh7+iWulUwwkDUWO9IuX4H77gCMDZ9jcv0wBiZQqCCMjnNPfvtDWQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1697799041; c=relaxed/simple; bh=okx1R5fepe5oA/DBhgy0rKlQ0tzASzEWto/R6n+olv8=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=VVQ93FEN/ijNZ/RIFJLmdYvQMWf5r64F0Cz6gtZ/S6cYD2eRkf5DqPlueIVbP/1lo1R7nCxmB9m5lz6Zvt/VN4SmRZKdPSRzGK1cwXN+P47HeehlLjAjb+Br9vt7bUcV3KwO1/9L2k/2S+Tk1aFB9q/e5EaPVRJnJEtjxf+0g7E= ARC-Authentication-Results: i=2; server2.sourceware.org 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=RX/Hk5k3ZIplKJisi5CF1sprfYMdMJ7aZcOFmnA3Y7I=; b=tRI4KkYoC4KaeuwZQteu2ImsNZbJ2ZOt+RwpV126PjQ3gXp8y8UAelx/JRqYlZ2aPOMh4QsfJGKZ/A5B2tlQqisDMH/BqdUt1ZnDDfz3ok8JJ/gdVNQnQ2zJvweklUpenbBiG3Fw35HVMiMy5KKa3DBM2La2qPoMPiK58N8Qs6A= Received: from AM5PR1001CA0022.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:206:2::35) by VE1PR08MB5631.eurprd08.prod.outlook.com (2603:10a6:800:1ab::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.26; Fri, 20 Oct 2023 10:50:35 +0000 Received: from AMS0EPF0000019D.eurprd05.prod.outlook.com (2603:10a6:206:2:cafe::63) by AM5PR1001CA0022.outlook.office365.com (2603:10a6:206:2::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.26 via Frontend Transport; Fri, 20 Oct 2023 10:50: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=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 AMS0EPF0000019D.mail.protection.outlook.com (10.167.16.249) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.20 via Frontend Transport; Fri, 20 Oct 2023 10:50:32 +0000 Received: ("Tessian outbound 028b72acc2da:v215"); Fri, 20 Oct 2023 10:50:32 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 0db3ed8362f5418b X-CR-MTA-TID: 64aa7808 Received: from e5e7fc2a300c.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 2F838D70-EEA7-488B-9BA1-FEF44CC8EF9B.1; Fri, 20 Oct 2023 10:50:25 +0000 Received: from EUR01-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e5e7fc2a300c.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 20 Oct 2023 10:50:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SMSqDri3isJ/B2S+7P5kXTxgOQqoHTLUTMgnnYWTRr2mGUkgeSujU6XqV2L9/fpYxBC4uf54gPsSKmTM5LxWF+lxwAgR26c+4Z6QEsfkNuBL64S+g6haaUTE8+laqa6lhvtMBpKtMunLFexhvLx+FZ/IwmMEFZ3GIlHIIwVEXlqEjHaxaZHzwfTLkka/NECMP2Yi0SwJ4OkTvp/r4j2+I4BdW1P05unjH3H8rdMXmJtQDP5iE10isKKhfZ2TTeUZl3u/al2k7/AXv/zv4B7BmDXJ9C5j8LW+ZTgeRKjm7nsuZu6QQQ7NPtL8IAUR7GE38/m8OntSHeNxRs4QehcyvQ== 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=RX/Hk5k3ZIplKJisi5CF1sprfYMdMJ7aZcOFmnA3Y7I=; b=lnqu2E4xlbqRoBKDV6yPefwNw4MVYaG7bIWsBF90v5EDC8bN/TpCe1WKkdWz7LtdtxuQTQ4bJzB1wuwqUU4fwfyspfsxYLtZxH+AbrYiNTXET9shEjBTiLeg8E6VimGpdLy3/K4WO1NGg0ePL9uDdMOGg/kW+vBOwHKOBtbMtsKurvPjmPplqZbSUs+Aep/zimfqN2I5pHN2UZi26CAeU9NffzuFQsrI0mgSNGhmh5QDV4gywqVTgm6Uxvi5ew0H705Bn6/8J00JJ+i6n1SAXj7sYK7OG71qKVs/6hXT0I5sf0ez20KHSSbYYsDaZNYoCCyVWKEJ0qbbczaChd7ztA== 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=RX/Hk5k3ZIplKJisi5CF1sprfYMdMJ7aZcOFmnA3Y7I=; b=tRI4KkYoC4KaeuwZQteu2ImsNZbJ2ZOt+RwpV126PjQ3gXp8y8UAelx/JRqYlZ2aPOMh4QsfJGKZ/A5B2tlQqisDMH/BqdUt1ZnDDfz3ok8JJ/gdVNQnQ2zJvweklUpenbBiG3Fw35HVMiMy5KKa3DBM2La2qPoMPiK58N8Qs6A= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from AM0PR08MB5316.eurprd08.prod.outlook.com (2603:10a6:208:185::14) by GV2PR08MB8317.eurprd08.prod.outlook.com (2603:10a6:150:bf::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.26; Fri, 20 Oct 2023 10:50:23 +0000 Received: from AM0PR08MB5316.eurprd08.prod.outlook.com ([fe80::b979:1aa2:3557:ff30]) by AM0PR08MB5316.eurprd08.prod.outlook.com ([fe80::b979:1aa2:3557:ff30%4]) with mapi id 15.20.6907.022; Fri, 20 Oct 2023 10:50:23 +0000 Date: Fri, 20 Oct 2023 11:50:19 +0100 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: don't pass loop_vinfo to vect_set_loop_condition during prolog peeling [PR111866] Message-ID: <patch-17865-tamar@arm.com> Content-Type: multipart/mixed; boundary="dKqZKMzrctplBtK5" Content-Disposition: inline X-ClientProxiedBy: LO2P265CA0121.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9f::13) To AM0PR08MB5316.eurprd08.prod.outlook.com (2603:10a6:208:185::14) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: AM0PR08MB5316:EE_|GV2PR08MB8317:EE_|AMS0EPF0000019D:EE_|VE1PR08MB5631:EE_ X-MS-Office365-Filtering-Correlation-Id: 46f751c3-65dc-48db-c43e-08dbd15a625b 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: aif6kKeCy97jBaTu5aAKg+jCwTmSDef7b7BmcU+bY3jEe+xP7SA1owtPl874YTyNVyVVjm4jEz7UZhd13ViFVjdwYBNG7tJZhdICIzJgEdj+TI8gX+xoQL4to1te+6YZAY+MrmgaQunsNvU/IQSRi0hqJBMnRiOdShw2H+Zt5qnmK0A8Ejh8w9Yr1cK8Y9KyHdna5yjgu5GD2vB/7QEUAvFY4dleahBDL3YpHHQm8aB4WkfTFFU6oH8nvpodTK23dTybnDIzY4KU14WAz6CMHN1JYGwc0ycn+5r5QeTKCV80UkxR4hnP2rdTZW/lNz+0AMbkdFHvl5MJJmJsFrMc5e45oqFQmoiGNMVcNcBQ0Q+Jg9C395BldQe+hab3qNrRE8kQ8q1EX73FgVQsByc26T/NLeB6Q09fgEIbBJnzZpNDn4O4OS9KAvmmkGQkPZmAYaJsHE4C7b+xlddA1x4hJ3hJmbhjeSNpf/qbDUfl1bzo01SxjH6x2SNUpRfQD7Sebwp7B9I/Lk741vNWrktSYUVXEwX0bwdzZqt9UjhpRXl7RWJ3UOhH1bzXhgqGMa6VcB+bQQTaA13ovA/5jNgzzoD9dSYYatYHnw3hl2zB51FbOUrHKZs/oS3ywkCD6O0xc9nEm8Dq5BteFDx30+J7uA== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR08MB5316.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(346002)(136003)(366004)(396003)(376002)(39860400002)(230922051799003)(64100799003)(451199024)(1800799009)(186009)(26005)(4743002)(2616005)(83380400001)(33964004)(44144004)(6666004)(6512007)(6506007)(38100700002)(86362001)(36756003)(2906002)(235185007)(478600001)(6486002)(8936002)(8676002)(4326008)(44832011)(41300700001)(316002)(66946007)(66476007)(66556008)(5660300002)(6916009)(4216001)(2700100001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV2PR08MB8317 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: AMS0EPF0000019D.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: efc8664e-b57c-4242-4a6d-08dbd15a5c55 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Li2l2dgFPofHFUA4nloy+nG4JK2FEzBhBgiYSb2N5S+JJ3TXw9wwBCpqIIhROQiL5oX3sp630j219skNUHddjkti9JzvhLmKNRKfxnpP4AklTOud/ymUkCcJDspLrQb9+BzuOa6QFLCxaKOKEjqPU2MAR7Oqg6r98PggnBMxKSGJZ82GTTtCPSrphvpOtxnSxceuNWbjGxcHcYxLpUljGqaPZokq3fsAonPg4Zf9MctN7wW/Ci4lKGfk+7ABLuvCVKNPKZd+fUvNpslufla7LUhpEqmT321okxHP35RLAarkzzIK18tnjyWXuSnJshJnqS2AeiiIRa4xCl2fcru5g3bFyJ/iETellF6thMgNaFDjeqTvp4Bi0hP99i6VWHzS9mZ8n2qHjxdW9rIxx+pWUjJJuWUcCLAaSIx09lb5oaN7ZDIIlavl5vYS7SJnT4oLTWVudCmJ8PcsYEZKTS341gf/haOF93APvfqEFZCGsiLbnDujqaRc2IyLux39l1UuKYfxas4u6YKZCGqmvvpDwjOcbuja0nuBv55Xq5lXst0Jg94kp4v4CUKuxo7KUtk214kalfTOTQ0oKQPY2xGNvNmKfimzZNBxgXn4Zs+0CcZmMdjNG6EVimJ5OY5ka/hOXBhdLa4RQ9c05FbQOqBQIseipbTf6ADpArkBO2O7o+CJj8N9daN75b0wPhJfUWly/FcmU78rnMr7CLznOdT51N0yR74Ivhq/NdObhejsPZzOko+knmfgZlnVEOJsu62EI4+GKqqbTt5lOstROOy8sA== 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)(376002)(39850400004)(396003)(136003)(346002)(230922051799003)(451199024)(64100799003)(1800799009)(82310400011)(186009)(36840700001)(46966006)(86362001)(26005)(36860700001)(107886003)(2616005)(336012)(235185007)(83380400001)(4743002)(6506007)(44832011)(33964004)(6666004)(36756003)(6512007)(44144004)(41300700001)(2906002)(82740400003)(47076005)(356005)(81166007)(6486002)(40480700001)(5660300002)(478600001)(8936002)(8676002)(70206006)(4326008)(70586007)(6916009)(316002)(4216001)(2700100001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2023 10:50:32.9875 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 46f751c3-65dc-48db-c43e-08dbd15a625b 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: AMS0EPF0000019D.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5631 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_DMARC_NONE, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, 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 <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: 1780271355116483181 X-GMAIL-MSGID: 1780271355116483181 |
Series |
middle-end: don't pass loop_vinfo to vect_set_loop_condition during prolog peeling [PR111866]
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Tamar Christina
Oct. 20, 2023, 10:50 a.m. UTC
Hi All, During the refactoring I had passed loop_vinfo on to vect_set_loop_condition during prolog peeling. This parameter is unused in most cases except for in vect_set_loop_condition_partial_vectors where it's behaviour depends on whether loop_vinfo is NULL or not. Apparently this code expect it to be NULL and it reads the structures from a different location. This fixes the failing testcase which was not using the lens values determined earlier in vectorizable_store because it was looking it up in the given loop_vinfo instead. Bootstrapped Regtested on aarch64-none-linux-gnu, powerpc64le-unknown-linux-gnu, x86_64--nonelinux-gnu and no issues. PowerPC test failures are fixed as well. Ok for master? Thanks, Tamar gcc/ChangeLog: PR tree-optimization/PR111866 * tree-vect-loop-manip.cc (vect_do_peeling): Pass null as vinfo to vect_set_loop_condition during prolog peeling. --- inline copy of patch -- diff --git a/gcc/tree-vect-loop-manip.cc b/gcc/tree-vect-loop-manip.cc index db1d4f867ead5c6079cda3ff0d0870234d11e39d..9c2551261e33738feac71721d4f0160033907260 100644 -- diff --git a/gcc/tree-vect-loop-manip.cc b/gcc/tree-vect-loop-manip.cc index db1d4f867ead5c6079cda3ff0d0870234d11e39d..9c2551261e33738feac71721d4f0160033907260 100644 --- a/gcc/tree-vect-loop-manip.cc +++ b/gcc/tree-vect-loop-manip.cc @@ -3235,7 +3235,7 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree niters, tree nitersm1, /* Update the number of iterations for prolog loop. */ tree step_prolog = build_one_cst (TREE_TYPE (niters_prolog)); - vect_set_loop_condition (prolog, prolog_e, loop_vinfo, niters_prolog, + vect_set_loop_condition (prolog, prolog_e, NULL, niters_prolog, step_prolog, NULL_TREE, false); /* Skip the prolog loop. */
Comments
On Fri, 20 Oct 2023, Tamar Christina wrote: > Hi All, > > During the refactoring I had passed loop_vinfo on to vect_set_loop_condition > during prolog peeling. This parameter is unused in most cases except for in > vect_set_loop_condition_partial_vectors where it's behaviour depends on whether > loop_vinfo is NULL or not. Apparently this code expect it to be NULL and it > reads the structures from a different location. > > This fixes the failing testcase which was not using the lens values determined > earlier in vectorizable_store because it was looking it up in the given > loop_vinfo instead. > > Bootstrapped Regtested on aarch64-none-linux-gnu, powerpc64le-unknown-linux-gnu, > x86_64--nonelinux-gnu and no issues. PowerPC test failures are fixed as well. > > Ok for master? Eh, I remember PR110571 seeing this. But OK. Thanks, Richard. > Thanks, > Tamar > > gcc/ChangeLog: > > PR tree-optimization/PR111866 > * tree-vect-loop-manip.cc (vect_do_peeling): Pass null as vinfo to > vect_set_loop_condition during prolog peeling. > > --- inline copy of patch -- > diff --git a/gcc/tree-vect-loop-manip.cc b/gcc/tree-vect-loop-manip.cc > index db1d4f867ead5c6079cda3ff0d0870234d11e39d..9c2551261e33738feac71721d4f0160033907260 100644 > --- a/gcc/tree-vect-loop-manip.cc > +++ b/gcc/tree-vect-loop-manip.cc > @@ -3235,7 +3235,7 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree niters, tree nitersm1, > > /* Update the number of iterations for prolog loop. */ > tree step_prolog = build_one_cst (TREE_TYPE (niters_prolog)); > - vect_set_loop_condition (prolog, prolog_e, loop_vinfo, niters_prolog, > + vect_set_loop_condition (prolog, prolog_e, NULL, niters_prolog, > step_prolog, NULL_TREE, false); > > /* Skip the prolog loop. */ > > > > >
--- a/gcc/tree-vect-loop-manip.cc +++ b/gcc/tree-vect-loop-manip.cc @@ -3235,7 +3235,7 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree niters, tree nitersm1, /* Update the number of iterations for prolog loop. */ tree step_prolog = build_one_cst (TREE_TYPE (niters_prolog)); - vect_set_loop_condition (prolog, prolog_e, loop_vinfo, niters_prolog, + vect_set_loop_condition (prolog, prolog_e, NULL, niters_prolog, step_prolog, NULL_TREE, false); /* Skip the prolog loop. */