Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2195029/?format=api
{ "id": 2195029, "url": "http://patchwork.ozlabs.org/api/patches/2195029/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260210113104.60335-2-chris.bazley@arm.com/", "project": { "id": 17, "url": "http://patchwork.ozlabs.org/api/projects/17/?format=api", "name": "GNU Compiler Collection", "link_name": "gcc", "list_id": "gcc-patches.gcc.gnu.org", "list_email": "gcc-patches@gcc.gnu.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260210113104.60335-2-chris.bazley@arm.com>", "list_archive_url": null, "date": "2026-02-10T11:30:54", "name": "[v9,01/11] Preparation to support predicated vector tails for BB SLP", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "ed4f68d8125e57a228af96fb61fc765c1b169d45", "submitter": { "id": 89471, "url": "http://patchwork.ozlabs.org/api/people/89471/?format=api", "name": "Christopher Bazley", "email": "Chris.Bazley@arm.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260210113104.60335-2-chris.bazley@arm.com/mbox/", "series": [ { "id": 491659, "url": "http://patchwork.ozlabs.org/api/series/491659/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=491659", "date": "2026-02-10T11:30:56", "name": "Extend BB SLP vectorization to use predicated tails", "version": 9, "mbox": "http://patchwork.ozlabs.org/series/491659/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2195029/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2195029/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "gcc-patches@gcc.gnu.org" ], "Delivered-To": [ "patchwork-incoming@legolas.ozlabs.org", "gcc-patches@gcc.gnu.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256\n header.s=selector1 header.b=objF8bD/;\n\tdkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com\n header.a=rsa-sha256 header.s=selector1 header.b=objF8bD/;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=38.145.34.32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)", "sourceware.org;\n\tdkim=pass (1024-bit key,\n unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256\n header.s=selector1 header.b=objF8bD/;\n\tdkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com\n header.a=rsa-sha256 header.s=selector1 header.b=objF8bD/", "sourceware.org;\n dmarc=pass (p=none dis=none) header.from=arm.com", "sourceware.org; spf=pass smtp.mailfrom=arm.com", "server2.sourceware.org;\n arc=pass smtp.remote-ip=52.101.69.39" ], "Received": [ "from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4f9KRG664jz1xtV\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 10 Feb 2026 22:42:02 +1100 (AEDT)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id BCB364CF306B\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 10 Feb 2026 11:42:00 +0000 (GMT)", "from AM0PR83CU005.outbound.protection.outlook.com\n (mail-westeuropeazon11010039.outbound.protection.outlook.com [52.101.69.39])\n by sourceware.org (Postfix) with ESMTPS id 594064CF3104\n for <gcc-patches@gcc.gnu.org>; Tue, 10 Feb 2026 11:33:08 +0000 (GMT)", "from AS4PR10CA0030.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:5d8::11)\n by AS2PR08MB10126.eurprd08.prod.outlook.com (2603:10a6:20b:645::13)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9587.13; Tue, 10 Feb\n 2026 11:32:59 +0000", "from AMS0EPF000001B1.eurprd05.prod.outlook.com\n (2603:10a6:20b:5d8:cafe::85) by AS4PR10CA0030.outlook.office365.com\n (2603:10a6:20b:5d8::11) with Microsoft SMTP Server (version=TLS1_3,\n cipher=TLS_AES_256_GCM_SHA384) id 15.20.9611.8 via Frontend Transport; Tue,\n 10 Feb 2026 11:32:58 +0000", "from outbound-uk1.az.dlp.m.darktrace.com (4.158.2.129) by\n AMS0EPF000001B1.mail.protection.outlook.com (10.167.16.165) with Microsoft\n SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9611.8\n via Frontend Transport; Tue, 10 Feb 2026 11:32:59 +0000", "from DU7PR01CA0018.eurprd01.prod.exchangelabs.com\n (2603:10a6:10:50f::12) by GV1PR08MB11177.eurprd08.prod.outlook.com\n (2603:10a6:150:1f5::21) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9587.19; Tue, 10 Feb\n 2026 11:31:50 +0000", "from DB1PEPF000509F3.eurprd02.prod.outlook.com\n (2603:10a6:10:50f:cafe::33) by DU7PR01CA0018.outlook.office365.com\n (2603:10a6:10:50f::12) with Microsoft SMTP Server (version=TLS1_3,\n cipher=TLS_AES_256_GCM_SHA384) id 15.20.9611.8 via Frontend Transport; Tue,\n 10 Feb 2026 11:31:49 +0000", "from nebula.arm.com (172.205.89.229) by\n DB1PEPF000509F3.mail.protection.outlook.com (10.167.242.149) with Microsoft\n SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.20.9611.8 via Frontend Transport; Tue, 10 Feb 2026 11:31:50 +0000", "from AZ-NEU-EX04.Arm.com (10.240.25.138) by AZ-NEU-EX03.Arm.com\n (10.240.25.137) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.29; Tue, 10 Feb\n 2026 11:31:49 +0000", "from ip-10-248-139-165.eu-west-1.compute.internal (10.248.139.165)\n by mail.arm.com (10.240.25.138) with Microsoft SMTP Server id 15.2.2562.29\n via Frontend Transport; Tue, 10 Feb 2026 11:31:49 +0000" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org BCB364CF306B", "OpenDKIM Filter v2.11.0 sourceware.org 594064CF3104" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 594064CF3104", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 594064CF3104", "ARC-Seal": [ "i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1770723188; cv=pass;\n b=waeECeyiiy+rhQTmmbpU4yeOPO8MjmTmiZi1O25R+jGHItmHW1iA/otVp3Sy4Ug4fqy8b3dTIiLgK6OZTFLYUhxvfd3xHmCR9o4d/lDay6/KbS7n9aCPXd0IWhBnluN29imWqv+w2cs6uzcJkDB3WAWsTR2GrWpLkhL0Ld0nwlg=", "i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass;\n b=KT3Ad9RmLZpEkRYBrGiK4JDAR1yMPsvtDwpGu1pyHiSJILE9DJ4Vahwt+/jDmxNt6yN+61oJJISf1sxcGM0ZwTxs6SZY+nERHh7RaShWMViNXThOK6gENhwnr/obXYG3VDb0whOK8Y2Rt8I3FkDh4/HLCgwc352ts4ueAiZLssEzQzzYcKSXbjRFLU2RkLztBlUpyI4tu+wWgrjmJXKc+EeOYTxiDNVAs5/ypSJCJi2orEpm7smNTMGzHyBjIJQQWYV6o8ZmTneh5s4Wltksl9mf9bdi87fHxilKlU8OoDIFXVqUFNneP99MhOb8I7gpHjBFF/VA1WJDA/qio7Yung==", "i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;\n b=DTk6NTerkbBdwwS1h8bI+gEdxbG9hQDiDsFN/jsn1qQHPwxJAmPknhCGmBvy5QnEGXruTsY5MHcmricacknc/Bypw4ZwQmEY49W2bT5NuVyVVdEKEbe7TXqORePrtVSn5fFNeu2MsGzaqV2I1bHjgtO6Pb4r1HuOSZ2DUU7m426HyfeX+vBY+K2W4GNo0SNRWBZ3UtKquyQ4TwL4OQB0s/j9m/ogHJLsfEYKQoOEe6Rq33UBAI3A6RQIKHsslDKsamGNEtP2GvceeBxkCeYqFCobPH1Por/l282TQG9o4hlPPCppX3lzQCfV3btJ8bZKvHrAksulY6gs+Cp4aXt7yA==" ], "ARC-Message-Signature": [ "i=3; a=rsa-sha256; d=sourceware.org; s=key;\n t=1770723188; c=relaxed/simple;\n bh=DP9oStfm67hqftgGFm6mBoH0+H2C70Sc5wRq6oj7zS8=;\n h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID:\n MIME-Version;\n b=Q6eB7XmHiSQ6Wa5ZiiCuXSgI57/wQgMGKgWe5mA7PeNUnH/L3VblhNyNMdgL9LwJ0y6F1h7A+UB4m3sx0IhtzBv6ii4Z/CHx/GY77WDffCW+R8oczdn6t66jIydBbh+hzGQfPEQId1cUdvZSuWhfMCAqucPsC+QPx72EuRsLyi8=", "i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector10001;\n 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;\n bh=crZhNhM2Oa+7GcRJILwkA9taTdY9sgd0KZ4XTk2lk9c=;\n b=YtN64bGCSUBGcEdkQHRXTvPQUBJntIU/ZBqBmJ17v52+zxhQElF8Dn76F0JDiNPvumFIaGt+P1BSunke5a+b7bO2uXjRT8LoEvv5oUExoG3jvlMebygvAZwwpTwSrvZQolmYJGBpiaqnUvrSoz2X/oA8bhnQdEKhK2CI1i20F8Z1oCP0KtKzdL7/s9wnUJo0iuk8WvOSmxMvcA6qkUSimCU7rqHkyUQDySBZHWmQcjiw2Hc7Hb0bPLcWHXjIjleUtEi9iy+hQwpGY0dZjP5CZfradPXvCJPiORSq5XDanAbPi/pdmpSdoymAcoQM3HryuxkfCgB3dl7hWDMBqi9zxg==", "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector10001;\n 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;\n bh=crZhNhM2Oa+7GcRJILwkA9taTdY9sgd0KZ4XTk2lk9c=;\n b=Y4f+Z5SSfYs3iG7wvGmMjJTq2fQNutpBbjsLTFyxc7dFotA1+GkhkM8THUyBn6QG3dojOGwDj8rGWQGMucFpbwKflsQh+uERGVD43BbTk/E62xYalD2D0k93PBIGx4OcdjdYqsSYRJN6c33ygZRAtIbz9yZo4WhhxVyuHs+Sf7O7NbQlCFBgkE5xlwQZppOy0Oszen7cnnk3xk3C1Qxt+8S62bFtfOfqeacFPbJChBUIb+9NeeyuVAQHTxFN8rwcw0tFPOs1ClNrYTeDgsLE2Xlj67L8TQhM53xpaEPj+KzLlRU5vW+9YJ+NbX4JrtobpXDRr4FdBrJ+ucHRbvKpJQ==" ], "ARC-Authentication-Results": [ "i=3; server2.sourceware.org", "i=2; mx.microsoft.com 1; spf=pass (sender ip is\n 4.158.2.129) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass\n (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass\n (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1\n spf=[1,1,smtp.mailfrom=arm.com] dmarc=[1,1,header.from=arm.com])", "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 172.205.89.229) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com;\n dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com;\n dkim=none (message not signed); arc=none (0)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=crZhNhM2Oa+7GcRJILwkA9taTdY9sgd0KZ4XTk2lk9c=;\n b=objF8bD/SgVaE99ZIajwnaWymI/seXpcEbsL4Z1EIl1f8ERr5OPLXSYGmYJHhGC5mixAT6a88K8b77FKezf0V5E6IOwKKlWgnsQPQs89RtZhvZ4hoRBDkYbCFrLXIm7B/H92OEgAcNfJjFGQ2hsmgtL/XI2u2LAPKQ39qHkKho8=", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=crZhNhM2Oa+7GcRJILwkA9taTdY9sgd0KZ4XTk2lk9c=;\n b=objF8bD/SgVaE99ZIajwnaWymI/seXpcEbsL4Z1EIl1f8ERr5OPLXSYGmYJHhGC5mixAT6a88K8b77FKezf0V5E6IOwKKlWgnsQPQs89RtZhvZ4hoRBDkYbCFrLXIm7B/H92OEgAcNfJjFGQ2hsmgtL/XI2u2LAPKQ39qHkKho8=" ], "X-MS-Exchange-Authentication-Results": [ "spf=pass (sender IP is 4.158.2.129)\n smtp.mailfrom=arm.com; dkim=pass (signature was verified)\n header.d=arm.com;dmarc=pass action=none header.from=arm.com;", "spf=pass (sender IP is 172.205.89.229)\n smtp.mailfrom=arm.com; dkim=none (message not signed)\n header.d=none;dmarc=pass action=none header.from=arm.com;" ], "Received-SPF": [ "Pass (protection.outlook.com: domain of arm.com designates\n 4.158.2.129 as permitted sender) receiver=protection.outlook.com;\n client-ip=4.158.2.129; helo=outbound-uk1.az.dlp.m.darktrace.com; pr=C", "Pass (protection.outlook.com: domain of arm.com designates\n 172.205.89.229 as permitted sender) receiver=protection.outlook.com;\n client-ip=172.205.89.229; helo=nebula.arm.com; pr=C" ], "From": "Christopher Bazley <chris.bazley@arm.com>", "To": "<gcc-patches@gcc.gnu.org>", "CC": "<rguenther@suse.de>, <Tamar.Christina@arm.com>,\n <rdsandiford@googlemail.com>, Christopher Bazley <chris.bazley@arm.com>", "Subject": "[PATCH v9 01/11] Preparation to support predicated vector tails for\n BB SLP", "Date": "Tue, 10 Feb 2026 11:30:54 +0000", "Message-ID": "<20260210113104.60335-2-chris.bazley@arm.com>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20260210113104.60335-1-chris.bazley@arm.com>", "References": "<20260210113104.60335-1-chris.bazley@arm.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-EOPAttributedMessage": "1", "X-MS-TrafficTypeDiagnostic": "\n DB1PEPF000509F3:EE_|GV1PR08MB11177:EE_|AMS0EPF000001B1:EE_|AS2PR08MB10126:EE_", "X-MS-Office365-Filtering-Correlation-Id": "3d46010b-f114-4211-938f-08de6898249c", "x-checkrecipientrouted": "true", "NoDisclaimer": "true", "X-MS-Exchange-SenderADCheck": "1", "X-MS-Exchange-AntiSpam-Relay": "0", "X-Microsoft-Antispam-Untrusted": "BCL:0;\n ARA:13230040|1800799024|376014|36860700013|82310400026|7142099003;", "X-Microsoft-Antispam-Message-Info-Original": "\n faO0AP6NOpapHstekyDe6rRJqQ5X6nZXNz3rUcdg1nlWwb961t4/t4RfwwYEc9b8RGOfZ4Tn1KmnPGz5typK7cL/EWrxkAvUvXa12KkRtuUuRBiQYkYDQUJ1+33pThRMoTOlVbVelyeB9x+NGR0T6DsxlHL3DyNkUUIfUA9HDdD5GfUujjXU5v4EUZRpEZxXG60qKi7nOb/J/RFTMYqrHhoZNX6ecYF54vs/Q+/LTJbV19Qj0gXkvM5Sa6njHh5YuBZlD7IPEdBAobq4LXgweUkwvhfcI2OR1UgcikTL16jSrTNLxpHqbRpzpoewlhQjcrCWAw3X3jtWvOCaK+lvPuqYQ9i9DQs1Flqt74HK4F70eUO8OwV9n3GEdTSgts7qO+R9zOOU4SfQkUfOeyjqw+YI6zxUMRRMjwRqoHCuEXjtqTqywREmya7kVAvAEo1eJcapLOxQesY9oHC2JjHNsafMBVAJMDjuQWu+eqcdm/v0CVzBP6bS+IFl4kTHt0am62pO6XNnUKuJoudzX6RctyKYIKmMQtONLseuT4qst8uuKFoCIUod/+CkxcmKFUzs3Mz6E3i4wLTKjkT+QboYOJ8+1kTWD482KR303SOo/RAU+XL9rNlDXhD0RhcbR9aN2AM9/CD1rkjBvg8K1BFeqCC/6yrukfp3saz1uOxKdX+8KaSHtSvsF3NHGCYiIVzHO6jHHm+VbArax8/vEJEn3q2fPORuRdeMB99QgnSz9XSviHLW/QUchH4EYou/CKM+ehVeTyCyy9Jup54NP4KkaiXyvnUqqaWZNXWDk9apCNigwik3fRer7kCKApcSAgpKY1DNwdNHCOVLG2WkMDacG+xyi2HLU6zG/cabPbyjB7zIkpRFHue1OhLWKBceXjY0GTOfBdhRNrwKAsDtsyRogj0hT0mwyOtK4QiWvZGAnA9lP2cAuYr5URF3i0SZGeIjAYu9zvnIBj/HaOrZgXIbN32BZ7AU+VxSdT+HV2SmCxJMLtuBb8B7Q8g4nZGMm4j606EoEr2cADciArXo17n+X/aM1VEDJjWXrvM3J3TdDel+Rrl8+kbW0rtva73p80FxgowGoCeFvqmyTX2zLlzmNGhf+qI7OX4byr+lFpVKCW1QAtSgYErnw+19hlpMSl5sqNKNqU50gOwnq0UOyFqHyM+o/lHxVT1rULlZcpOTVtvHb3v9BSP3A6iudv5/zAlGpjb3u6xHC8X4x/ZEVJTB0fYs3DnuG4uOaATH/YWwgtxeyBwyVzZ/QLNq3sIek67Gy5q4NRfY3xzVr7BAZB51tala8fBa0LhHdB9CtFF0TXkFOLjVDji81f2vRqU7hxTr94pT0QQGdSeZ3wBlFLSfYKls0OAs+S2hJ3L1aY5l92UoERAPAA2vRlwFukcVPl8RdesAdSrjE4xX9TbzoKjDo7PlWhJ3PweYM8wrg8qR0TfXICrI0hVrLp/Fce4YCep7HKeX43iPRksj5X5sjaZ0c4J9cn/e+KH09XYurbZuUISl0dm/OQ9ugcNo2ObEVE5UDlwJEgk2SNVPi8J/2PWKILTjzSEcwDwR3LJfgPjMHlTZ54KyKbD1k+p09PNf0M+RLZNxS9b4UG+YmqoQC62tPE8b3J1ESIsktqnt4u9GgoqAXHlJ86qPV3MWeJrguqusvxLhjDjgFR7WrqkR0n+wDA==", "X-Forefront-Antispam-Report-Untrusted": "CIP:172.205.89.229; CTRY:IE; LANG:en;\n SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent;\n CAT:NONE;\n SFS:(13230040)(1800799024)(376014)(36860700013)(82310400026)(7142099003);\n DIR:OUT; SFP:1101;", "X-MS-Exchange-Transport-CrossTenantHeadersStamped": [ "GV1PR08MB11177", "AS2PR08MB10126" ], "X-MS-Exchange-Transport-CrossTenantHeadersStripped": "\n AMS0EPF000001B1.eurprd05.prod.outlook.com", "X-MS-PublicTrafficType": "Email", "X-MS-Office365-Filtering-Correlation-Id-Prvs": "\n a65f580a-2c2d-4c8b-a71e-08de6897fb70", "X-Microsoft-Antispam": "BCL:0;\n ARA:13230040|376014|1800799024|14060799003|35042699022|82310400026|36860700013|7142099003;", "X-Microsoft-Antispam-Message-Info": "\n reNO5AxPNEMD7FmeP02cvXzUoxR/3zVDSx2WuG86tANBylu27DlLit1eZ+LfqGNBI58E2r5ENBMhvCBjTWpd3tbeyro0Dg/eTWndKGaoDP43zHoDkflGzPW4xYCp9ewyWTq5yiu3Tp7M8Wy9cRVzqvOuGpWDAdEeMEDmjZZEk9pL/Fjk3VVLzm1Cnia0OkDLd/56RWXEUrcgJOEhKpxDG0LILVeHw+2KftGJA+docPYP/At3xA1/H+nWJQCaNJls1FmS6XLWhM6tHsFELFPzKhpkxRdIqDK4Y9kwL+BFe/05cQgO53UzBwhXcZ+E9mpS6uT8UyQCWA5nFd/TStQBchVUQ5QCrS+Mpre+2LBEQetF3Ub7D5vnwC2S+inrz4kRzngUv1ji5IrGDL0QEbAhpN+M9D2cSs30lKvSSuF+KfWKuUCrZCpKPA0cfV6PkqQm00/ngH3Ujrptp98vJMjLsFNxelI4PB/W4Q++4u+8kaXFXQymqyJNQEi0AsaYSEYZy10LiIzc2dzCQn5AkuOHFT8S/Nu3b7AUYfH4Q/XJPeHsqYXILyAK+7qajK0hbM7czOjSZNVtZAJxByVbZ/9AqdiCAN6/mwSBA3nUIEgrmWBtGzHfMvj1bACQphBq+0QPtLIFpeg/erefwrxy+JMWg75cuLj5R6Di5BSCKtWPD1po6TIyRXVlW1hr183NWSwzZXtBedt1Ge9XC0hIHOjlmJRFms1G5aj1BZYZ7FnEvrduCScXPGtFUPUNPQWOAMxUyDvj7hKUKFOORg7nOWGuC37wa1ceEQHW4ID2cgurvMULHEX3zjVHjmcBDSHp5UPbycshYNmE3sE5o1OjSE/cY/vI4iBGgrg7/Y8o48yehjsKKAt7yMyQV7wUdsXYmjswGUgHxAi/vaalZkWaOkkjCx0n/lIY2Z7FNz6Zhcxn4PnJouVkfKdgpogOv3NIhlU2RruEl2Cm3URdSOI5OPGpbOSdWTAO97wamSd+rNS/LFT0o7ruVaOtF+2gBGCgqtk63fWGVDwY5hRrlg/hlFrPgSxHkinErXzo/kt5+D4M/zE1Bii2YDlcPBCvx1kNXTBKCoNxLpKPBvgHJ6er+SglOqGvEqGQGpyFmH8xUlLavt4yRVnSgo2J3A0MNok8z8gM/jessFxWDbCd2p7RjjvPXzNGte5zAXlC4rh3w/z7hRLk96Uz1Rc+KIozOS1WjayyDRzq1pTP/x+Vcd3XUU+E9URID5gf32CGudPirw5p74pdAv95dxIpZv7ObRS2ZYZ5JwIgobE8MNDDUm0jcJUQqVL5wk8Bbzh+1bUcZcNwDIoRQCfUYVG4qQKvOPD20FtZei0tdrvBZS40eDb0UlWXRgY1v1yrkD2w0+OzZAucAO3JgSz/abPcyPb7+S+NkAlb4OCVVo81twLwlVew1NQNl/09/ioNOduKpmGEP75f7A9vxILB7hTgBkCxBZx1rDzydGn4UBiWWPKWjoJf4mqmtJF7CEruaLFYp8Pt/I2l1FI4s60iYl0zy2ZDB6SvshPGXSFXiZ7wjIf3RDve8ofdRJeap6sABoy27aRpIqvudl5J9chpP6fq2TgSQCGFmorw+RfdTXN3iFrT5BvdWcyutQjwSIEFH29yP8ujLoIB+lpjXf/nyOzObbbgPi9cFvQsya5Jfsl3LhPWbz4QsbUjLw==", "X-Forefront-Antispam-Report": "CIP:4.158.2.129; CTRY:GB; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:outbound-uk1.az.dlp.m.darktrace.com;\n PTR:InfoDomainNonexistent; CAT:NONE;\n SFS:(13230040)(376014)(1800799024)(14060799003)(35042699022)(82310400026)(36860700013)(7142099003);\n DIR:OUT; SFP:1101;", "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1", "X-MS-Exchange-AntiSpam-MessageData-0": "\n 90wNWlpJEkgZ+Y+aE35z2nEzYvebXfehYZ3/D5rCL2K/h1B5p0TVuUB5hI52AzfhvgWGZ2LQvfjaI4r6rfCDQQy/Cz2/v8dGnvYVdYt2GYBWHsrLKMc6rzyCbPl50/W91pB0qidslVq49+Qsh5ZROo7l8ghlts2Ua40n39yuuIZStJxHR9OKsBi6yxo/JQju2UJrHAYjwDMb513bt9NVs/oBtxeMUjjpilw8+GBrkTScpddJRQEX8tboI3sWwjTLhF2zxA9jdSrb9g8awq2GM6shyhDq6xz3R/dM5XEMTTxZr3+iJ7YSPdPQvxso8yohDGHVp0FZfD+eHHS7rAJnhWkV7EtdEZ/VzOUc8SDH8geKqIrjAi4dRiS1FmnO+Is15/9UGKnOh9ivD7zEWg3Ub6y46wHqBEfs0IkK8u3PYEBJzo6iHAyATZtEG9AycyQe", "X-OriginatorOrg": "arm.com", "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "10 Feb 2026 11:32:59.0802 (UTC)", "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 3d46010b-f114-4211-938f-08de6898249c", "X-MS-Exchange-CrossTenant-Id": "f34e5979-57d9-4aaa-ad4d-b122a662184d", "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[4.158.2.129];\n Helo=[outbound-uk1.az.dlp.m.darktrace.com]", "X-MS-Exchange-CrossTenant-AuthSource": "\n AMS0EPF000001B1.eurprd05.prod.outlook.com", "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous", "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem", "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>,\n <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>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>", "Errors-To": "gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org" }, "content": "Calls to vect_(get|record)_loop_(mask|len) are replaced\nwith calls to new wrappers that have an extra (SLP node)\nparameter and which can operate on any vec_info, not just\na loop_vec_info. These wrappers pass calls through to the\noriginal functions (and ignore the SLP node) when invoked\nwith a loop_vec_info; otherwise, vect_record_(len|mask)\ndo nothing (for now).\n\nDirect use of LOOP_VINFO_FULLY_(MASKED|WITH_LENGTH)_P,\nand LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P is replaced\nwith wrappers named vect_(fully_masked|fully_with_length)_p,\nvect_can_use_partial_vectors_p (for queries) and\nvect_cannot_use_partial_vectors (for updates). For BB\nSLP, vect_cannot_use_partial_vectors does nothing and\nthe getters return false (for now).\n\nTo minimize code churn, the new wrappers are only used in\ncode shared between loop vectorization and BB SLP.\n\ngcc/ChangeLog:\n\n\t* tree-vect-stmts.cc (vect_record_mask): New function\n\tthat wraps calls to vect_record_loop_mask.\n\t(vect_get_mask): New function that wraps calls to\n\tvect_get_loop_mask.\n\t(vect_record_len): New function that wraps calls to\n\tvect_record_loop_len.\n\t(vect_get_len): New function that wraps calls to\n\tvect_get_loop_len.\n\t(check_load_store_for_partial_vectors): Substitute a parameter\n\tof type vec_info * for loop_vec_info.\n\tUse vect_record_len instead of vect_record_loop_len.\n\tUse vect_record_mask instead of vect_record_loop_mask.\n\tUse vect_cannot_use_partial_vectors instead of\n\tLOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P.\n\tDelete local aliases for LOOP_VINFO_MASKS and LOOP_VINFO_LENS.\n\t(prepare_vec_mask): Substitute a parameter of type vec_info *\n\tfor loop_vec_info. Rename the loop_mask parameter.\n\t(vectorizable_call): Delete local aliases for LOOP_VINFO_MASKS\n\tand LOOP_VINFO_LENS.\n\tRename masked_loop_p as masked_p and remove requirement for\n\tnon-null loop_vinfo.\n\tRename len_loop_p as len_p and remove requirement for non-null\n\tloop_vinfo.\n\tUse vect_cannot_use_partial_vectors instead of\n\tLOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P.\n\tUse vect_record_len instead of vect_record_loop_len.\n\tUse vect_record_mask instead of vect_record_loop_mask.\n\tUse vect_fully_masked_p instead of LOOP_VINFO_FULLY_MASKED_P.\n\tUse vect_fully_with_length_p instead of\n\tLOOP_VINFO_FULLY_WITH_LENGTH_P.\n\tUse vect_get_mask instead of vect_get_loop_mask.\n\tUse vect_get_len instead of vect_get_loop_len.\n\tPass vec_info * instead of loop_vec_info to prepare_vec_mask.\n\t(vectorizable_simd_clone_call): Use\n\tvect_can_use_partial_vectors_p and\n\tvect_cannot_use_partial_vectors instead of\n\tLOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P.\n\tUse vect_record_mask instead of vect_record_loop_mask.\n\tUse vect_fully_masked_p instead of LOOP_VINFO_FULLY_MASKED_P.\n\tUse vect_get_mask instead of vect_get_loop_mask.\n\tPass vec_info * instead of loop_vec_info to prepare_vec_mask.\n\tDelete local aliases for LOOP_VINFO_MASKS.\n\t(vectorizable_conversion): Use\n\tvect_can_use_partial_vectors_p and\n\tvect_cannot_use_partial_vectors instead of\n\tLOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P.\n\t(vectorizable_operation): Delete local alias for\n\tLOOP_VINFO_LENS.\n\tRename masked_loop_p as masked_p and remove requirement for\n\tnon-null loop_vinfo.\n\tRename len_loop_p as len_p and remove requirement for non-null\n\tloop_vinfo.\n\tUse vect_can_use_partial_vectors_p and\n\tvect_cannot_use_partial_vectors instead of\n\tLOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P.\n\tUse vect_record_len instead of vect_record_loop_len.\n\tUse vect_record_mask instead of vect_record_loop_mask.\n\tUse vect_fully_masked_p instead of LOOP_VINFO_FULLY_MASKED_P.\n\tUse vect_fully_with_length_p instead of\n\tLOOP_VINFO_FULLY_WITH_LENGTH_P.\n\tUse vect_get_mask instead of vect_get_loop_mask.\n\tUse vect_get_len instead of vect_get_loop_len.\n\t(vectorizable_store): Use vect_can_use_partial_vectors_p\n\tinstead of LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P.\n\tPass vec_info * instead of loop_vec_info to\n\tcheck_load_store_for_partial_vectors.\n\tDelete local alias for LOOP_VINFO_MASKS.\n\tUse vect_fully_masked_p instead of LOOP_VINFO_FULLY_MASKED_P.\n\tUse vect_fully_with_length_p instead of\n\tLOOP_VINFO_FULLY_WITH_LENGTH_P.\n\tPass vec_info * instead of loop_vec_info to prepare_vec_mask.\n\t(vectorizable_load): As above.\n\t* tree-vectorizer.h (class vec_info): Moved declaration of\n\tthe vec_cond_masked_set member from class _loop_vec_info\n\tto class vec_info.\n\t(class _loop_vec_info): As above.\n\t(prepare_vec_mask): Substitute a parameter of type vec_info *\n\tfor loop_vec_info.\n\t(vect_can_use_partial_vectors_p): New function that wraps use\n\tof LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P as a getter.\n\t(vect_cannot_use_partial_vectors): New function that wraps use\n\tof LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P to clear the flag.\n\t(vect_fully_with_length_p): New function that wraps use of\n\tLOOP_VINFO_FULLY_WITH_LENGTH_P.\n\t(vect_fully_masked_p): New function that wraps use of\n\tLOOP_VINFO_FULLY_MASKED_P.\n\n---\n gcc/tree-vect-stmts.cc | 413 ++++++++++++++++++++++-------------------\n gcc/tree-vectorizer.h | 74 +++++++-\n 2 files changed, 294 insertions(+), 193 deletions(-)", "diff": "diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc\nindex ba2e4633258..5df4fff0fc7 100644\n--- a/gcc/tree-vect-stmts.cc\n+++ b/gcc/tree-vect-stmts.cc\n@@ -1384,12 +1384,88 @@ vectorizable_internal_function (combined_fn cfn, tree fndecl,\n return IFN_LAST;\n }\n \n+/* Record that a complete set of masks associated with VINFO would need to\n+ contain a sequence of NVECTORS masks that each control a vector of type\n+ VECTYPE. If SCALAR_MASK is nonnull, the fully-masked loop would AND\n+ these vector masks with the vector version of SCALAR_MASK. */\n+static void\n+vect_record_mask (vec_info *vinfo, slp_tree slp_node, unsigned int nvectors,\n+\t\t tree vectype, tree scalar_mask)\n+{\n+ loop_vec_info loop_vinfo = dyn_cast<loop_vec_info> (vinfo);\n+ if (loop_vinfo)\n+ vect_record_loop_mask (loop_vinfo, &LOOP_VINFO_MASKS (loop_vinfo), nvectors,\n+\t\t\t vectype, scalar_mask);\n+ else\n+ (void) slp_node; /* FORNOW */\n+}\n+\n+/* Given a complete set of masks associated with VINFO, extract mask number\n+ INDEX for an rgroup that operates on NVECTORS vectors of type VECTYPE, where\n+ 0 <= INDEX < NVECTORS. Alternatively, if doing basic block vectorization,\n+ materialize an equivalent mask for SLP_NODE. Insert any set-up statements\n+ before GSI. */\n+static tree\n+vect_get_mask (vec_info *vinfo, slp_tree slp_node, gimple_stmt_iterator *gsi,\n+\t unsigned int nvectors, tree vectype, unsigned int index)\n+{\n+ gcc_assert (vect_fully_masked_p (vinfo, slp_node));\n+ loop_vec_info loop_vinfo = dyn_cast<loop_vec_info> (vinfo);\n+ if (loop_vinfo)\n+ return vect_get_loop_mask (loop_vinfo, gsi, &LOOP_VINFO_MASKS (loop_vinfo),\n+\t\t\t nvectors, vectype, index);\n+ else\n+ {\n+ (void) slp_node; /* FORNOW */\n+ return NULL_TREE;\n+ }\n+}\n+\n+/* Record that a complete set of lengths associated with VINFO would need to\n+ contain a sequence of NVECTORS lengths for controlling an operation on\n+ VECTYPE. The operation splits each element of VECTYPE into FACTOR separate\n+ subelements, measuring the length as a number of these subelements. */\n+static void\n+vect_record_len (vec_info *vinfo, slp_tree slp_node, unsigned int nvectors,\n+\t\t tree vectype, unsigned int factor)\n+{\n+ loop_vec_info loop_vinfo = dyn_cast<loop_vec_info> (vinfo);\n+ if (loop_vinfo)\n+ vect_record_loop_len (loop_vinfo, &LOOP_VINFO_LENS (loop_vinfo), nvectors,\n+\t\t\t vectype, factor);\n+ else\n+ (void) slp_node; /* FORNOW */\n+}\n+\n+/* Given a complete set of lengths associated with VINFO, extract length number\n+ INDEX for an rgroup that operates on NVECTORS vectors of type VECTYPE, where\n+ 0 <= INDEX < NVECTORS. Alternatively, if doing basic block vectorization,\n+ materialize an equivalent length for SLP_NODE. Return a value that contains\n+ FACTOR multiplied by the number of elements that should be processed. Insert\n+ any set-up statements before GSI. */\n+\n+static tree\n+vect_get_len (vec_info *vinfo, slp_tree slp_node, gimple_stmt_iterator *gsi,\n+\t unsigned int nvectors, tree vectype, unsigned int index,\n+\t unsigned int factor)\n+{\n+ gcc_assert (vect_fully_with_length_p (vinfo, slp_node));\n+ loop_vec_info loop_vinfo = dyn_cast<loop_vec_info> (vinfo);\n+ if (loop_vinfo)\n+ return vect_get_loop_len (loop_vinfo, gsi, &LOOP_VINFO_LENS (loop_vinfo),\n+\t\t\t nvectors, vectype, index, factor);\n+ else\n+ {\n+ (void) slp_node; /* FORNOW */\n+ return NULL_TREE;\n+ }\n+}\n \n static tree permute_vec_elements (vec_info *, tree, tree, tree, stmt_vec_info,\n \t\t\t\t gimple_stmt_iterator *);\n \n-/* Check whether a load or store statement in the loop described by\n- LOOP_VINFO is possible in a loop using partial vectors. This is\n+/* Check whether a load or store statement in the loop or SLP group described by\n+ VINFO is possible using partial vectors. This is\n testing whether the vectorizer pass has the appropriate support,\n as well as whether the target does.\n \n@@ -1404,13 +1480,14 @@ static tree permute_vec_elements (vec_info *, tree, tree, tree, stmt_vec_info,\n \n Clear LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P if a loop using partial\n vectors is not supported, otherwise record the required rgroup control\n- types.\n+ types. For basic block SLP, simply record which style of partial vectors\n+ is available (if any).\n \n If partial vectors can be used and ELSVALS is nonzero the supported\n else values will be added to the vector ELSVALS points to. */\n \n static void\n-check_load_store_for_partial_vectors (loop_vec_info loop_vinfo, tree vectype,\n+check_load_store_for_partial_vectors (vec_info *vinfo, tree vectype,\n \t\t\t\t slp_tree slp_node,\n \t\t\t\t vec_load_store_type vls_type,\n \t\t\t\t int group_size,\n@@ -1418,6 +1495,7 @@ check_load_store_for_partial_vectors (loop_vec_info loop_vinfo, tree vectype,\n \t\t\t\t slp_tree mask_node,\n \t\t\t\t vec<int> *elsvals = nullptr)\n {\n+ loop_vec_info loop_vinfo = dyn_cast <loop_vec_info> (vinfo);\n vect_memory_access_type memory_access_type = ls->memory_access_type;\n \n /* Invariant loads need no special support. */\n@@ -1441,9 +1519,7 @@ check_load_store_for_partial_vectors (loop_vec_info loop_vinfo, tree vectype,\n \t scalar_mask = def;\n }\n \n- unsigned int nvectors = vect_get_num_copies (loop_vinfo, slp_node);\n- vec_loop_masks *masks = &LOOP_VINFO_MASKS (loop_vinfo);\n- vec_loop_lens *lens = &LOOP_VINFO_LENS (loop_vinfo);\n+ unsigned int nvectors = vect_get_num_copies (vinfo, slp_node);\n machine_mode vecmode = TYPE_MODE (vectype);\n bool is_load = (vls_type == VLS_LOAD);\n if (memory_access_type == VMAT_LOAD_STORE_LANES)\n@@ -1454,10 +1530,10 @@ check_load_store_for_partial_vectors (loop_vec_info loop_vinfo, tree vectype,\n \t\t\t\t\t\telsvals)\n \t\t : vect_store_lanes_supported (vectype, group_size, true));\n if (ifn == IFN_MASK_LEN_LOAD_LANES || ifn == IFN_MASK_LEN_STORE_LANES)\n-\tvect_record_loop_len (loop_vinfo, lens, nvectors, vectype, 1);\n+\tvect_record_len (vinfo, slp_node, nvectors, vectype, 1);\n else if (ifn == IFN_MASK_LOAD_LANES || ifn == IFN_MASK_STORE_LANES)\n-\tvect_record_loop_mask (loop_vinfo, masks, nvectors, vectype,\n-\t\t\t scalar_mask);\n+\tvect_record_mask (vinfo, slp_node, nvectors, vectype,\n+\t\t\t scalar_mask);\n else\n \t{\n \t if (dump_enabled_p ())\n@@ -1465,7 +1541,7 @@ check_load_store_for_partial_vectors (loop_vec_info loop_vinfo, tree vectype,\n \t\t\t \"can't operate on partial vectors because\"\n \t\t\t \" the target doesn't have an appropriate\"\n \t\t\t \" load/store-lanes instruction.\\n\");\n-\t LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo) = false;\n+\t vect_cannot_use_partial_vectors (vinfo, slp_node);\n \t}\n return;\n }\n@@ -1499,14 +1575,13 @@ check_load_store_for_partial_vectors (loop_vec_info loop_vinfo, tree vectype,\n \t\t\t\t\t\t memory_type,\n \t\t\t\t\t\t off_vectype, scale,\n \t\t\t\t\t\t elsvals))\n-\tvect_record_loop_len (loop_vinfo, lens, nvectors, vectype, 1);\n+\tvect_record_len (vinfo, slp_node, nvectors, vectype, 1);\n else if (internal_gather_scatter_fn_supported_p (ifn, vectype,\n \t\t\t\t\t\t memory_type,\n \t\t\t\t\t\t off_vectype, scale,\n \t\t\t\t\t\t elsvals)\n \t || memory_access_type == VMAT_GATHER_SCATTER_LEGACY)\n-\tvect_record_loop_mask (loop_vinfo, masks, nvectors, vectype,\n-\t\t\t scalar_mask);\n+\tvect_record_mask (vinfo, slp_node, nvectors, vectype, scalar_mask);\n else\n \t{\n \t if (dump_enabled_p ())\n@@ -1514,7 +1589,7 @@ check_load_store_for_partial_vectors (loop_vec_info loop_vinfo, tree vectype,\n \t\t\t \"can't operate on partial vectors because\"\n \t\t\t \" the target doesn't have an appropriate\"\n \t\t\t \" gather load or scatter store instruction.\\n\");\n-\t LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo) = false;\n+\t vect_cannot_use_partial_vectors (vinfo, slp_node);\n \t}\n return;\n }\n@@ -1527,7 +1602,7 @@ check_load_store_for_partial_vectors (loop_vec_info loop_vinfo, tree vectype,\n \tdump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,\n \t\t\t \"can't operate on partial vectors because an\"\n \t\t\t \" access isn't contiguous.\\n\");\n- LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo) = false;\n+ vect_cannot_use_partial_vectors (vinfo, slp_node);\n return;\n }\n \n@@ -1537,7 +1612,7 @@ check_load_store_for_partial_vectors (loop_vec_info loop_vinfo, tree vectype,\n \tdump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,\n \t\t\t \"can't operate on partial vectors when emulating\"\n \t\t\t \" vector operations.\\n\");\n- LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo) = false;\n+ vect_cannot_use_partial_vectors (vinfo, slp_node);\n return;\n }\n \n@@ -1553,7 +1628,7 @@ check_load_store_for_partial_vectors (loop_vec_info loop_vinfo, tree vectype,\n };\n \n poly_uint64 nunits = TYPE_VECTOR_SUBPARTS (vectype);\n- poly_uint64 vf = LOOP_VINFO_VECT_FACTOR (loop_vinfo);\n+ poly_uint64 vf = loop_vinfo ? LOOP_VINFO_VECT_FACTOR (loop_vinfo) : 1;\n machine_mode mask_mode;\n machine_mode vmode;\n bool using_partial_vectors_p = false;\n@@ -1562,7 +1637,7 @@ check_load_store_for_partial_vectors (loop_vec_info loop_vinfo, tree vectype,\n {\n nvectors = group_memory_nvectors (group_size * vf, nunits);\n unsigned factor = (vecmode == vmode) ? 1 : GET_MODE_UNIT_SIZE (vecmode);\n- vect_record_loop_len (loop_vinfo, lens, nvectors, vectype, factor);\n+ vect_record_len (vinfo, slp_node, nvectors, vectype, factor);\n using_partial_vectors_p = true;\n }\n else if (targetm.vectorize.get_mask_mode (vecmode).exists (&mask_mode)\n@@ -1570,7 +1645,7 @@ check_load_store_for_partial_vectors (loop_vec_info loop_vinfo, tree vectype,\n \t\t\t\t\t elsvals))\n {\n nvectors = group_memory_nvectors (group_size * vf, nunits);\n- vect_record_loop_mask (loop_vinfo, masks, nvectors, vectype, scalar_mask);\n+ vect_record_mask (vinfo, slp_node, nvectors, vectype, scalar_mask);\n using_partial_vectors_p = true;\n }\n \n@@ -1581,35 +1656,35 @@ check_load_store_for_partial_vectors (loop_vec_info loop_vinfo, tree vectype,\n \t\t\t \"can't operate on partial vectors because the\"\n \t\t\t \" target doesn't have the appropriate partial\"\n \t\t\t \" vectorization load or store.\\n\");\n- LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo) = false;\n+ vect_cannot_use_partial_vectors (vinfo, slp_node);\n }\n }\n \n /* Return the mask input to a masked load or store. VEC_MASK is the vectorized\n- form of the scalar mask condition and LOOP_MASK, if nonnull, is the mask\n- that needs to be applied to all loads and stores in a vectorized loop.\n- Return VEC_MASK if LOOP_MASK is null or if VEC_MASK is already masked,\n- otherwise return VEC_MASK & LOOP_MASK.\n+ form of the scalar mask condition and LOOP_OR_TAIL_MASK, if nonnull, is the\n+ mask that needs to be applied to all loads and stores in a vectorized loop.\n+ Return VEC_MASK if LOOP_OR_TAIL_MASK is null or if VEC_MASK is already\n+ masked, otherwise return VEC_MASK & LOOP_OR_TAIL_MASK.\n \n MASK_TYPE is the type of both masks. If new statements are needed,\n insert them before GSI. */\n \n tree\n-prepare_vec_mask (loop_vec_info loop_vinfo, tree mask_type, tree loop_mask,\n+prepare_vec_mask (vec_info *vinfo, tree mask_type, tree loop_or_tail_mask,\n \t\t tree vec_mask, gimple_stmt_iterator *gsi)\n {\n gcc_assert (useless_type_conversion_p (mask_type, TREE_TYPE (vec_mask)));\n- if (!loop_mask)\n+ if (!loop_or_tail_mask)\n return vec_mask;\n \n- gcc_assert (TREE_TYPE (loop_mask) == mask_type);\n+ gcc_assert (TREE_TYPE (loop_or_tail_mask) == mask_type);\n \n- if (loop_vinfo->vec_cond_masked_set.contains ({ vec_mask, loop_mask }))\n+ if (vinfo->vec_cond_masked_set.contains ({ vec_mask, loop_or_tail_mask }))\n return vec_mask;\n \n tree and_res = make_temp_ssa_name (mask_type, NULL, \"vec_mask_and\");\n- gimple *and_stmt = gimple_build_assign (and_res, BIT_AND_EXPR,\n-\t\t\t\t\t vec_mask, loop_mask);\n+ gimple *and_stmt\n+ = gimple_build_assign (and_res, BIT_AND_EXPR, vec_mask, loop_or_tail_mask);\n \n gsi_insert_before (gsi, and_stmt, GSI_SAME_STMT);\n return and_res;\n@@ -3701,8 +3776,6 @@ vectorizable_call (vec_info *vinfo,\n \t\t\t ? ifn : get_conditional_internal_fn (ifn));\n internal_fn cond_len_fn = get_len_internal_fn (cond_fn);\n int len_opno = internal_fn_len_index (cond_len_fn);\n- vec_loop_masks *masks = (loop_vinfo ? &LOOP_VINFO_MASKS (loop_vinfo) : NULL);\n- vec_loop_lens *lens = (loop_vinfo ? &LOOP_VINFO_LENS (loop_vinfo) : NULL);\n unsigned int nvectors = vect_get_num_copies (vinfo, slp_node);\n if (cost_vec) /* transformation not required. */\n {\n@@ -3720,8 +3793,7 @@ vectorizable_call (vec_info *vinfo,\n DUMP_VECT_SCOPE (\"vectorizable_call\");\n vect_model_simple_cost (vinfo, 1, slp_node, cost_vec);\n \n- if (loop_vinfo\n-\t && LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo)\n+ if (vect_can_use_partial_vectors_p (vinfo, slp_node)\n \t && (reduc_idx >= 0 || could_trap || mask_opno >= 0))\n \t{\n \t if (reduc_idx >= 0\n@@ -3736,7 +3808,7 @@ vectorizable_call (vec_info *vinfo,\n \t\tdump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,\n \t\t\t\t \"can't use a fully-masked loop because no\"\n \t\t\t\t \" conditional operation is available.\\n\");\n-\t LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo) = false;\n+\t vect_cannot_use_partial_vectors (vinfo, slp_node);\n \t }\n \t else\n \t {\n@@ -3746,11 +3818,10 @@ vectorizable_call (vec_info *vinfo,\n \t if (cond_len_fn != IFN_LAST\n \t\t && direct_internal_fn_supported_p (cond_len_fn, vectype_out,\n \t\t\t\t\t\t OPTIMIZE_FOR_SPEED))\n-\t\tvect_record_loop_len (loop_vinfo, lens, nvectors, vectype_out,\n-\t\t\t\t 1);\n+\t\tvect_record_len (vinfo, slp_node, nvectors, vectype_out, 1);\n \t else\n-\t\tvect_record_loop_mask (loop_vinfo, masks, nvectors, vectype_out,\n-\t\t\t\t scalar_mask);\n+\t\tvect_record_mask (vinfo, slp_node, nvectors, vectype_out,\n+\t\t\t\t scalar_mask);\n \t }\n \t}\n return true;\n@@ -3765,10 +3836,10 @@ vectorizable_call (vec_info *vinfo,\n scalar_dest = gimple_call_lhs (stmt);\n vec_dest = vect_create_destination_var (scalar_dest, vectype_out);\n \n- bool masked_loop_p = loop_vinfo && LOOP_VINFO_FULLY_MASKED_P (loop_vinfo);\n- bool len_loop_p = loop_vinfo && LOOP_VINFO_FULLY_WITH_LENGTH_P (loop_vinfo);\n+ bool masked_p = vect_fully_masked_p (vinfo, slp_node);\n+ bool len_p = vect_fully_with_length_p (vinfo, slp_node);\n unsigned int vect_nargs = nargs;\n- if (len_loop_p)\n+ if (len_p)\n {\n if (len_opno >= 0)\n \t{\n@@ -3783,7 +3854,7 @@ vectorizable_call (vec_info *vinfo,\n else if (reduc_idx >= 0)\n \tgcc_unreachable ();\n }\n- else if (masked_loop_p && mask_opno == -1 && (reduc_idx >= 0 || could_trap))\n+ else if (masked_p && mask_opno == -1 && (reduc_idx >= 0 || could_trap))\n {\n ifn = cond_fn;\n vect_nargs += 2;\n@@ -3827,23 +3898,22 @@ vectorizable_call (vec_info *vinfo,\n \t {\n \t int varg = 0;\n \t /* Add the mask if necessary. */\n-\t if ((masked_loop_p || len_loop_p) && mask_opno == -1\n+\t if ((masked_p || len_p) && mask_opno == -1\n \t\t && (reduc_idx >= 0 || could_trap))\n \t\t{\n \t\t gcc_assert (internal_fn_mask_index (ifn) == varg);\n-\t\t if (masked_loop_p)\n+\t\t if (masked_p)\n \t\t {\n \t\t unsigned int vec_num = vec_oprnds0.length ();\n-\t\t vargs[varg++] = vect_get_loop_mask (loop_vinfo, gsi,\n-\t\t\t\t\t\t\t masks, vec_num,\n-\t\t\t\t\t\t\t vectype_out, i);\n+\t\t vargs[varg++] = vect_get_mask (vinfo, slp_node, gsi,\n+\t\t\t\t\t\t vec_num, vectype_out, i);\n \t\t }\n \t\t else\n \t\t {\n \t\t tree mask_vectype = truth_type_for (vectype_out);\n-\t\t vargs[varg++] = vect_build_all_ones_mask (loop_vinfo,\n-\t\t\t\t\t\t\t\tstmt_info,\n-\t\t\t\t\t\t\t\tmask_vectype);\n+\t\t vargs[varg++]\n+\t\t\t= vect_build_all_ones_mask (vinfo, stmt_info,\n+\t\t\t\t\t\t mask_vectype);\n \t\t }\n \t\t}\n \t size_t k;\n@@ -3853,8 +3923,8 @@ vectorizable_call (vec_info *vinfo,\n \t\t vargs[varg++] = vec_oprndsk[i];\n \t\t}\n \t /* Add the else value if necessary. */\n-\t if ((masked_loop_p || len_loop_p) && mask_opno == -1\n-\t\t && (reduc_idx >= 0 || could_trap))\n+\t if ((masked_p || len_p) && mask_opno == -1\n+\t\t && (reduc_idx >= 0 || could_trap))\n \t\t{\n \t\t gcc_assert (internal_fn_else_index (ifn) == varg);\n \t\t if (reduc_idx >= 0)\n@@ -3892,24 +3962,26 @@ vectorizable_call (vec_info *vinfo,\n \t\t}\n \t else\n \t\t{\n-\t\t if (len_opno >= 0 && len_loop_p)\n+\t\t if (len_opno >= 0 && len_p)\n \t\t {\n \t\t unsigned int vec_num = vec_oprnds0.length ();\n-\t\t tree len = vect_get_loop_len (loop_vinfo, gsi, lens,\n-\t\t\t\t\t\t vec_num, vectype_out, i, 1);\n+\t\t tree len = vect_get_len (vinfo, slp_node, gsi, vec_num,\n+\t\t\t\t\t vectype_out, i, 1);\n \t\t signed char biasval\n-\t\t\t= LOOP_VINFO_PARTIAL_LOAD_STORE_BIAS (loop_vinfo);\n+\t\t\t= loop_vinfo\n+\t\t\t ? LOOP_VINFO_PARTIAL_LOAD_STORE_BIAS (loop_vinfo)\n+\t\t\t : 0;\n \t\t tree bias = build_int_cst (intQI_type_node, biasval);\n \t\t vargs[len_opno] = len;\n \t\t vargs[len_opno + 1] = bias;\n \t\t }\n-\t\t else if (mask_opno >= 0 && masked_loop_p)\n+\t\t else if (mask_opno >= 0 && masked_p)\n \t\t {\n \t\t unsigned int vec_num = vec_oprnds0.length ();\n-\t\t tree mask = vect_get_loop_mask (loop_vinfo, gsi, masks,\n-\t\t\t\t\t\t vec_num, vectype_out, i);\n+\t\t tree mask = vect_get_mask (vinfo, slp_node, gsi, vec_num,\n+\t\t\t\t\t\t vectype_out, i);\n \t\t vargs[mask_opno]\n-\t\t\t= prepare_vec_mask (loop_vinfo, TREE_TYPE (mask), mask,\n+\t\t\t= prepare_vec_mask (vinfo, TREE_TYPE (mask), mask,\n \t\t\t\t\t vargs[mask_opno], gsi);\n \t\t }\n \n@@ -4440,14 +4512,14 @@ vectorizable_simd_clone_call (vec_info *vinfo, stmt_vec_info stmt_info,\n \t return false;\n \t }\n \n- if (!bestn_inbranch && loop_vinfo)\n+ if (!bestn_inbranch)\n \t{\n \t if (dump_enabled_p ()\n-\t && LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo))\n+\t && vect_can_use_partial_vectors_p (vinfo, slp_node))\n \t dump_printf_loc (MSG_NOTE, vect_location,\n \t\t\t \"can't use a fully-masked loop because no\"\n \t\t\t \" masked simd clone was available.\\n\");\n-\t LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo) = false;\n+\t vect_cannot_use_partial_vectors (vinfo, slp_node);\n \t}\n \n /* When the original call is pure or const but the SIMD ABI dictates\n@@ -4471,17 +4543,15 @@ vectorizable_simd_clone_call (vec_info *vinfo, stmt_vec_info stmt_info,\n for (i = 0;\n \t i < (bestn_inbranch ? bestn_inbranch : bestn)->simdclone->nargs; i++)\n \t{\n-\t if (loop_vinfo\n-\t && LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo)\n+\t if (vect_can_use_partial_vectors_p (vinfo, slp_node)\n \t && (bestn_inbranch->simdclone->args[i].arg_type\n \t\t == SIMD_CLONE_ARG_TYPE_MASK))\n \t {\n \t if (masked_call_offset)\n \t\t/* When there is an explicit mask we require the\n \t\t number of elements to match up. */\n-\t\tvect_record_loop_mask (loop_vinfo,\n-\t\t\t\t &LOOP_VINFO_MASKS (loop_vinfo),\n-\t\t\t\t ncopies_in, vectype, NULL_TREE);\n+\t\tvect_record_mask (vinfo, slp_node, ncopies_in, vectype,\n+\t\t\t\t NULL_TREE);\n \t else\n \t\t{\n \t\t /* When there is no explicit mask on the call we have\n@@ -4512,9 +4582,8 @@ vectorizable_simd_clone_call (vec_info *vinfo, stmt_vec_info stmt_info,\n \t\t callee_nelements = TYPE_VECTOR_SUBPARTS (masktype);\n \t\t }\n \t\t auto o = vector_unroll_factor (nunits, callee_nelements);\n-\t\t vect_record_loop_mask (loop_vinfo,\n-\t\t\t\t\t &LOOP_VINFO_MASKS (loop_vinfo),\n-\t\t\t\t\t ncopies * o, masktype, NULL_TREE);\n+\t\t vect_record_mask (vinfo, slp_node, ncopies * o, masktype,\n+\t\t\t\t NULL_TREE);\n \t\t}\n \t }\n \t else if ((bestn->simdclone->args[i].arg_type\n@@ -4707,23 +4776,16 @@ vectorizable_simd_clone_call (vec_info *vinfo, stmt_vec_info stmt_info,\n \t\t\t if (m == 0)\n \t\t\t vec_oprnds_i[i] = 0;\n \t\t\t vec_oprnd0 = vec_oprnds[i][vec_oprnds_i[i]++];\n-\t\t\t if (loop_vinfo\n-\t\t\t && LOOP_VINFO_FULLY_MASKED_P (loop_vinfo))\n+\t\t\t if (vect_fully_masked_p (vinfo, slp_node))\n \t\t\t {\n-\t\t\t vec_loop_masks *loop_masks\n-\t\t\t\t= &LOOP_VINFO_MASKS (loop_vinfo);\n-\t\t\t tree loop_mask\n-\t\t\t\t= vect_get_loop_mask (loop_vinfo, gsi,\n-\t\t\t\t\t\t loop_masks, ncopies_in,\n-\t\t\t\t\t\t vectype, j);\n+\t\t\t tree mask\n+\t\t\t\t= vect_get_mask (vinfo, slp_node, gsi,\n+\t\t\t\t\t\t ncopies_in, vectype, j);\n \t\t\t vec_oprnd0\n-\t\t\t\t= prepare_vec_mask (loop_vinfo,\n-\t\t\t\t\t\t TREE_TYPE (loop_mask),\n-\t\t\t\t\t\t loop_mask, vec_oprnd0,\n-\t\t\t\t\t\t gsi);\n-\t\t\t loop_vinfo->vec_cond_masked_set.add ({ vec_oprnd0,\n-\t\t\t\t\t\t\t\t loop_mask });\n-\n+\t\t\t\t= prepare_vec_mask (vinfo, TREE_TYPE (mask),\n+\t\t\t\t\t\t mask, vec_oprnd0, gsi);\n+\t\t\t vinfo->vec_cond_masked_set.add (\n+\t\t\t\t{vec_oprnd0, mask});\n \t\t\t }\n \t\t\t vec_oprnd0\n \t\t\t = build3 (VEC_COND_EXPR, atype, vec_oprnd0,\n@@ -4922,12 +4984,9 @@ vectorizable_simd_clone_call (vec_info *vinfo, stmt_vec_info stmt_info,\n \t o = vector_unroll_factor (nunits, callee_nelements);\n \t for (m = j * o; m < (j + 1) * o; m++)\n \t {\n-\t if (loop_vinfo && LOOP_VINFO_FULLY_MASKED_P (loop_vinfo))\n-\t\t{\n-\t\t vec_loop_masks *loop_masks = &LOOP_VINFO_MASKS (loop_vinfo);\n-\t\t mask = vect_get_loop_mask (loop_vinfo, gsi, loop_masks,\n-\t\t\t\t\t ncopies * o, mask_vectype, m);\n-\t\t}\n+\t if (vect_fully_masked_p (vinfo, slp_node))\n+\t\tmask = vect_get_mask (vinfo, slp_node, gsi, ncopies * o,\n+\t\t\t\t mask_vectype, m);\n \t else\n \t\tmask = vect_build_all_ones_mask (vinfo, stmt_info,\n \t\t\t\t\t\t mask_argtype);\n@@ -5334,7 +5393,7 @@ vectorizable_conversion (vec_info *vinfo,\n vec<tree> vec_oprnds1 = vNULL;\n tree vop0;\n bb_vec_info bb_vinfo = dyn_cast <bb_vec_info> (vinfo);\n- loop_vec_info loop_vinfo = dyn_cast <loop_vec_info> (vinfo);\n+ loop_vec_info loop_vinfo = dyn_cast<loop_vec_info> (vinfo);\n int multi_step_cvt = 0;\n vec<tree> interm_types = vNULL;\n tree intermediate_type, cvt_type = NULL_TREE;\n@@ -5696,8 +5755,7 @@ vectorizable_conversion (vec_info *vinfo,\n }\n \n if (modifier == WIDEN\n- && loop_vinfo\n- && LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo)\n+ && vect_can_use_partial_vectors_p (vinfo, slp_node)\n && (code1 == VEC_WIDEN_MULT_EVEN_EXPR\n \t || widening_evenodd_fn_p (code1)))\n {\n@@ -5706,7 +5764,7 @@ vectorizable_conversion (vec_info *vinfo,\n \t\t\t \"can't use a fully-masked loop because\"\n \t\t\t \" widening operation on even/odd elements\"\n \t\t\t \" mixes up lanes.\\n\");\n- LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo) = false;\n+ vect_cannot_use_partial_vectors (vinfo, slp_node);\n }\n \n if (cost_vec)\t\t/* transformation not required. */\n@@ -6788,7 +6846,6 @@ vectorizable_operation (vec_info *vinfo,\n \n int reduc_idx = SLP_TREE_REDUC_IDX (slp_node);\n vec_loop_masks *masks = (loop_vinfo ? &LOOP_VINFO_MASKS (loop_vinfo) : NULL);\n- vec_loop_lens *lens = (loop_vinfo ? &LOOP_VINFO_LENS (loop_vinfo) : NULL);\n internal_fn cond_fn = get_conditional_internal_fn (code);\n internal_fn cond_len_fn = get_conditional_len_internal_fn (code);\n \n@@ -6805,27 +6862,24 @@ vectorizable_operation (vec_info *vinfo,\n \n if (cost_vec) /* transformation not required. */\n {\n- if (loop_vinfo\n-\t && LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo)\n+ if (vect_can_use_partial_vectors_p (vinfo, slp_node)\n \t && mask_out_inactive)\n \t{\n \t if (cond_len_fn != IFN_LAST\n \t && direct_internal_fn_supported_p (cond_len_fn, vectype,\n \t\t\t\t\t\t OPTIMIZE_FOR_SPEED))\n-\t vect_record_loop_len (loop_vinfo, lens, vec_num, vectype,\n-\t\t\t\t 1);\n+\t vect_record_len (vinfo, slp_node, vec_num, vectype, 1);\n \t else if (cond_fn != IFN_LAST\n \t\t && direct_internal_fn_supported_p (cond_fn, vectype,\n \t\t\t\t\t\t OPTIMIZE_FOR_SPEED))\n-\t vect_record_loop_mask (loop_vinfo, masks, vec_num,\n-\t\t\t\t vectype, NULL);\n+\t vect_record_mask (vinfo, slp_node, vec_num, vectype, NULL);\n \t else\n \t {\n \t if (dump_enabled_p ())\n \t\tdump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,\n \t\t\t\t \"can't use a fully-masked loop because no\"\n \t\t\t\t \" conditional operation is available.\\n\");\n-\t LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo) = false;\n+\t vect_cannot_use_partial_vectors (vinfo, slp_node);\n \t }\n \t}\n \n@@ -6885,8 +6939,8 @@ vectorizable_operation (vec_info *vinfo,\n dump_printf_loc (MSG_NOTE, vect_location,\n \"transform binary/unary operation.\\n\");\n \n- bool masked_loop_p = loop_vinfo && LOOP_VINFO_FULLY_MASKED_P (loop_vinfo);\n- bool len_loop_p = loop_vinfo && LOOP_VINFO_FULLY_WITH_LENGTH_P (loop_vinfo);\n+ bool masked_p = vect_fully_masked_p (vinfo, slp_node);\n+ bool len_p = vect_fully_with_length_p (vinfo, slp_node);\n \n /* POINTER_DIFF_EXPR has pointer arguments which are vectorized as\n vectors with unsigned elements, but the result is signed. So, we\n@@ -7074,12 +7128,11 @@ vectorizable_operation (vec_info *vinfo,\n \t gimple_assign_set_lhs (new_stmt, new_temp);\n \t vect_finish_stmt_generation (vinfo, stmt_info, new_stmt, gsi);\n \t}\n- else if ((masked_loop_p || len_loop_p) && mask_out_inactive)\n+ else if ((masked_p || len_p) && mask_out_inactive)\n \t{\n \t tree mask;\n-\t if (masked_loop_p)\n-\t mask = vect_get_loop_mask (loop_vinfo, gsi, masks,\n-\t\t\t\t vec_num, vectype, i);\n+\t if (masked_p)\n+\t mask = vect_get_mask (vinfo, slp_node, gsi, vec_num, vectype, i);\n \t else\n \t /* Dummy mask. */\n \t mask = build_minus_one_cst (truth_type_for (vectype));\n@@ -7103,19 +7156,19 @@ vectorizable_operation (vec_info *vinfo,\n \t\t(cond_fn, vectype, vops.length () - 1, &vops[1]);\n \t vops.quick_push (else_value);\n \t }\n-\t if (len_loop_p)\n+\t if (len_p)\n \t {\n-\t tree len = vect_get_loop_len (loop_vinfo, gsi, lens,\n-\t\t\t\t\t vec_num, vectype, i, 1);\n+\t tree len\n+\t\t= vect_get_len (vinfo, slp_node, gsi, vec_num, vectype, i, 1);\n \t signed char biasval\n-\t\t= LOOP_VINFO_PARTIAL_LOAD_STORE_BIAS (loop_vinfo);\n+\t\t= loop_vinfo ? LOOP_VINFO_PARTIAL_LOAD_STORE_BIAS (loop_vinfo)\n+\t\t\t : 0;\n \t tree bias = build_int_cst (intQI_type_node, biasval);\n \t vops.quick_push (len);\n \t vops.quick_push (bias);\n \t }\n \t gcall *call\n-\t = gimple_build_call_internal_vec (masked_loop_p ? cond_fn\n-\t\t\t\t\t\t\t : cond_len_fn,\n+\t = gimple_build_call_internal_vec (masked_p ? cond_fn : cond_len_fn,\n \t\t\t\t\t vops);\n \t new_temp = make_ssa_name (vec_dest, call);\n \t gimple_call_set_lhs (call, new_temp);\n@@ -7129,8 +7182,7 @@ vectorizable_operation (vec_info *vinfo,\n \t /* When combining two masks check if either of them is elsewhere\n \t combined with a loop mask, if that's the case we can mark that the\n \t new combined mask doesn't need to be combined with a loop mask. */\n-\t if (masked_loop_p\n-\t && code == BIT_AND_EXPR\n+\t if (loop_vinfo && masked_p && code == BIT_AND_EXPR\n \t && VECTOR_BOOLEAN_TYPE_P (vectype))\n \t {\n \t if (loop_vinfo->scalar_cond_masked_set.contains ({ op0, vec_num }))\n@@ -7162,7 +7214,7 @@ vectorizable_operation (vec_info *vinfo,\n \t /* Enter the combined value into the vector cond hash so we don't\n \t AND it with a loop mask again. */\n \t if (mask)\n-\t loop_vinfo->vec_cond_masked_set.add ({ new_temp, mask });\n+\t vinfo->vec_cond_masked_set.add ({ new_temp, mask });\n \t}\n \n if (vec_cvt_dest)\n@@ -8304,9 +8356,8 @@ vectorizable_store (vec_info *vinfo,\n bool costing_p = cost_vec;\n if (costing_p) /* transformation not required. */\n {\n- if (loop_vinfo\n-\t && LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo))\n-\tcheck_load_store_for_partial_vectors (loop_vinfo, vectype, slp_node,\n+ if (vect_can_use_partial_vectors_p (vinfo, slp_node))\n+\tcheck_load_store_for_partial_vectors (vinfo, vectype, slp_node,\n \t\t\t\t\t vls_type, group_size, &ls,\n \t\t\t\t\t mask_node);\n \n@@ -8659,10 +8710,6 @@ vectorizable_store (vec_info *vinfo,\n }\n \n gcc_assert (alignment_support_scheme);\n- vec_loop_masks *loop_masks\n- = (loop_vinfo && LOOP_VINFO_FULLY_MASKED_P (loop_vinfo)\n- ? &LOOP_VINFO_MASKS (loop_vinfo)\n- : NULL);\n vec_loop_lens *loop_lens\n = (loop_vinfo && LOOP_VINFO_FULLY_WITH_LENGTH_P (loop_vinfo)\n ? &LOOP_VINFO_LENS (loop_vinfo)\n@@ -8674,14 +8721,14 @@ vectorizable_store (vec_info *vinfo,\n Shouldn't go with length-based approach if fully masked. */\n if (cost_vec == NULL)\n /* The cost_vec is NULL during transfrom. */\n- gcc_assert ((!loop_lens || !loop_masks));\n+ gcc_assert ((!vect_fully_with_length_p (vinfo, slp_node)\n+\t\t || !vect_fully_masked_p (vinfo, slp_node)));\n \n /* Targets with store-lane instructions must not require explicit\n realignment. vect_supportable_dr_alignment always returns either\n dr_aligned or dr_unaligned_supported for masked operations. */\n- gcc_assert ((memory_access_type != VMAT_LOAD_STORE_LANES\n-\t && !mask_node\n-\t && !loop_masks)\n+ gcc_assert ((memory_access_type != VMAT_LOAD_STORE_LANES && !mask_node\n+\t && !vect_fully_masked_p (vinfo, slp_node))\n \t || alignment_support_scheme == dr_aligned\n \t || alignment_support_scheme == dr_unaligned_supported);\n \n@@ -8811,18 +8858,18 @@ vectorizable_store (vec_info *vinfo,\n \t tree final_mask = NULL;\n \t tree final_len = NULL;\n \t tree bias = NULL;\n-\t if (loop_masks)\n-\t final_mask = vect_get_loop_mask (loop_vinfo, gsi, loop_masks,\n-\t\t\t\t\t ncopies, vectype, j);\n+\t if (vect_fully_masked_p (vinfo, slp_node))\n+\t final_mask\n+\t = vect_get_mask (vinfo, slp_node, gsi, ncopies, vectype, j);\n \t if (vec_mask)\n-\t final_mask = prepare_vec_mask (loop_vinfo, mask_vectype, final_mask,\n+\t final_mask = prepare_vec_mask (vinfo, mask_vectype, final_mask,\n \t\t\t\t\t vec_mask, gsi);\n \n \t if (lanes_ifn == IFN_MASK_LEN_STORE_LANES)\n \t {\n-\t if (loop_lens)\n-\t\tfinal_len = vect_get_loop_len (loop_vinfo, gsi, loop_lens,\n-\t\t\t\t\t ncopies, vectype, j, 1);\n+\t if (vect_fully_with_length_p (vinfo, slp_node))\n+\t\tfinal_len\n+\t\t = vect_get_len (vinfo, slp_node, gsi, ncopies, vectype, j, 1);\n \t else\n \t\tfinal_len = size_int (TYPE_VECTOR_SUBPARTS (vectype));\n \t signed char biasval\n@@ -8950,12 +8997,11 @@ vectorizable_store (vec_info *vinfo,\n \t tree bias = NULL_TREE;\n \t if (!costing_p)\n \t {\n-\t if (loop_masks)\n-\t\tfinal_mask = vect_get_loop_mask (loop_vinfo, gsi,\n-\t\t\t\t\t\t loop_masks, num_stmts,\n-\t\t\t\t\t\t vectype, j);\n+\t if (vect_fully_masked_p (vinfo, slp_node))\n+\t\tfinal_mask\n+\t\t = vect_get_mask (vinfo, slp_node, gsi, num_stmts, vectype, j);\n \t if (vec_mask)\n-\t\tfinal_mask = prepare_vec_mask (loop_vinfo, mask_vectype,\n+\t\tfinal_mask = prepare_vec_mask (vinfo, mask_vectype,\n \t\t\t\t\t final_mask, vec_mask, gsi);\n \t }\n \n@@ -9018,9 +9064,8 @@ vectorizable_store (vec_info *vinfo,\n \t if (ls.gs.ifn == IFN_MASK_LEN_SCATTER_STORE)\n \t\t{\n \t\t if (loop_lens)\n-\t\t final_len = vect_get_loop_len (loop_vinfo, gsi,\n-\t\t\t\t\t\t loop_lens, num_stmts,\n-\t\t\t\t\t\t vectype, j, 1);\n+\t\t final_len = vect_get_len (vinfo, slp_node, gsi, num_stmts,\n+\t\t\t\t\t vectype, j, 1);\n \t\t else\n \t\t final_len = size_int (TYPE_VECTOR_SUBPARTS (vectype));\n \n@@ -9305,9 +9350,7 @@ vectorizable_store (vec_info *vinfo,\n \t || useless_type_conversion_p (vectype, TREE_TYPE (vec_oprnd)));\n bool simd_lane_access_p\n = STMT_VINFO_SIMD_LANE_ACCESS_P (stmt_info) != 0;\n- if (!costing_p\n- && simd_lane_access_p\n- && !loop_masks\n+ if (!costing_p && simd_lane_access_p && !vect_fully_masked_p (vinfo, slp_node)\n && TREE_CODE (DR_BASE_ADDRESS (first_dr_info->dr)) == ADDR_EXPR\n && VAR_P (TREE_OPERAND (DR_BASE_ADDRESS (first_dr_info->dr), 0))\n && integer_zerop (get_dr_vinfo_offset (vinfo, first_dr_info))\n@@ -9361,13 +9404,12 @@ vectorizable_store (vec_info *vinfo,\n tree final_mask = NULL_TREE;\n tree final_len = NULL_TREE;\n tree bias = NULL_TREE;\n- if (loop_masks)\n-\tfinal_mask = vect_get_loop_mask (loop_vinfo, gsi, loop_masks,\n-\t\t\t\t\t vec_num, vectype, i);\n+ if (vect_fully_masked_p (vinfo, slp_node))\n+\tfinal_mask = vect_get_mask (vinfo, slp_node, gsi, vec_num, vectype, i);\n if (vec_mask)\n \tvec_mask = vec_masks[i];\n if (vec_mask)\n-\tfinal_mask = prepare_vec_mask (loop_vinfo, mask_vectype, final_mask,\n+\tfinal_mask = prepare_vec_mask (vinfo, mask_vectype, final_mask,\n \t\t\t\t vec_mask, gsi);\n \n if (i > 0)\n@@ -9403,8 +9445,8 @@ vectorizable_store (vec_info *vinfo,\n \t new_vmode = new_ovmode.require ();\n \t unsigned factor\n \t = (new_ovmode == vmode) ? 1 : GET_MODE_UNIT_SIZE (vmode);\n-\t final_len = vect_get_loop_len (loop_vinfo, gsi, loop_lens,\n-\t\t\t\t\t vec_num, vectype, i, factor);\n+\t final_len\n+\t = vect_get_len (vinfo, slp_node, gsi, vec_num, vectype, i, factor);\n \t}\n else if (final_mask)\n \t{\n@@ -9927,9 +9969,8 @@ vectorizable_load (vec_info *vinfo,\n \t return false;\n \t}\n \n- if (loop_vinfo\n-\t && LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo))\n-\tcheck_load_store_for_partial_vectors (loop_vinfo, vectype, slp_node,\n+ if (vect_can_use_partial_vectors_p (vinfo, slp_node))\n+\tcheck_load_store_for_partial_vectors (vinfo, vectype, slp_node,\n \t\t\t\t\t VLS_LOAD, group_size, &ls,\n \t\t\t\t\t mask_node, &ls.elsvals);\n \n@@ -10534,14 +10575,10 @@ vectorizable_load (vec_info *vinfo,\n ref_type = reference_alias_ptr_type (DR_REF (first_dr_info->dr));\n }\n \n- vec_loop_masks *loop_masks\n- = (loop_vinfo && LOOP_VINFO_FULLY_MASKED_P (loop_vinfo)\n- ? &LOOP_VINFO_MASKS (loop_vinfo)\n- : NULL);\n vec_loop_lens *loop_lens\n = (loop_vinfo && LOOP_VINFO_FULLY_WITH_LENGTH_P (loop_vinfo)\n- ? &LOOP_VINFO_LENS (loop_vinfo)\n- : NULL);\n+\t ? &LOOP_VINFO_LENS (loop_vinfo)\n+\t : NULL);\n \n /* The vect_transform_stmt and vect_analyze_stmt will go here but there\n are some difference here. We cannot enable both the lens and masks\n@@ -10549,15 +10586,15 @@ vectorizable_load (vec_info *vinfo,\n Shouldn't go with length-based approach if fully masked. */\n if (cost_vec == NULL)\n /* The cost_vec is NULL during transfrom. */\n- gcc_assert ((!loop_lens || !loop_masks));\n+ gcc_assert ((!vect_fully_with_length_p (vinfo, slp_node)\n+\t\t || !vect_fully_masked_p (vinfo, slp_node)));\n \n /* Targets with store-lane instructions must not require explicit\n realignment. vect_supportable_dr_alignment always returns either\n dr_aligned or dr_unaligned_supported for (non-length) masked\n operations. */\n- gcc_assert ((memory_access_type != VMAT_LOAD_STORE_LANES\n-\t && !mask_node\n-\t && !loop_masks)\n+ gcc_assert ((memory_access_type != VMAT_LOAD_STORE_LANES && !mask_node\n+\t && !vect_fully_masked_p (vinfo, slp_node))\n \t || mat_gather_scatter_p (memory_access_type)\n \t || alignment_support_scheme == dr_aligned\n \t || alignment_support_scheme == dr_unaligned_supported);\n@@ -10756,18 +10793,18 @@ vectorizable_load (vec_info *vinfo,\n \t tree final_mask = NULL_TREE;\n \t tree final_len = NULL_TREE;\n \t tree bias = NULL_TREE;\n-\t if (loop_masks)\n-\t final_mask = vect_get_loop_mask (loop_vinfo, gsi, loop_masks,\n-\t\t\t\t\t ncopies, vectype, j);\n+\t if (vect_fully_masked_p (vinfo, slp_node))\n+\t final_mask\n+\t = vect_get_mask (vinfo, slp_node, gsi, ncopies, vectype, j);\n \t if (vec_mask)\n-\t final_mask = prepare_vec_mask (loop_vinfo, mask_vectype, final_mask,\n+\t final_mask = prepare_vec_mask (vinfo, mask_vectype, final_mask,\n \t\t\t\t\t vec_mask, gsi);\n \n \t if (lanes_ifn == IFN_MASK_LEN_LOAD_LANES)\n \t {\n-\t if (loop_lens)\n-\t\tfinal_len = vect_get_loop_len (loop_vinfo, gsi, loop_lens,\n-\t\t\t\t\t ncopies, vectype, j, 1);\n+\t if (vect_fully_with_length_p (vinfo, slp_node))\n+\t\tfinal_len\n+\t\t = vect_get_len (vinfo, slp_node, gsi, ncopies, vectype, j, 1);\n \t else\n \t\tfinal_len = size_int (TYPE_VECTOR_SUBPARTS (vectype));\n \t signed char biasval\n@@ -10903,11 +10940,11 @@ vectorizable_load (vec_info *vinfo,\n \t {\n \t if (mask_node)\n \t\tvec_mask = vec_masks[i];\n-\t if (loop_masks)\n-\t\tfinal_mask = vect_get_loop_mask (loop_vinfo, gsi, loop_masks,\n-\t\t\t\t\t\t vec_num, vectype, i);\n+\t if (vect_fully_masked_p (vinfo, slp_node))\n+\t\tfinal_mask\n+\t\t = vect_get_mask (vinfo, slp_node, gsi, vec_num, vectype, i);\n \t if (vec_mask)\n-\t\tfinal_mask = prepare_vec_mask (loop_vinfo, mask_vectype,\n+\t\tfinal_mask = prepare_vec_mask (vinfo, mask_vectype,\n \t\t\t\t\t final_mask, vec_mask, gsi);\n \n \t if (i > 0 && !STMT_VINFO_GATHER_SCATTER_P (stmt_info))\n@@ -10974,8 +11011,8 @@ vectorizable_load (vec_info *vinfo,\n \t if (ls.gs.ifn == IFN_MASK_LEN_GATHER_LOAD)\n \t\t{\n \t\t if (loop_lens)\n-\t\t final_len = vect_get_loop_len (loop_vinfo, gsi, loop_lens,\n-\t\t\t\t\t\t vec_num, vectype, i, 1);\n+\t\t final_len = vect_get_len (vinfo, slp_node, gsi, vec_num,\n+\t\t\t\t\t vectype, i, 1);\n \t\t else\n \t\t final_len = build_int_cst (sizetype,\n \t\t\t\t\t TYPE_VECTOR_SUBPARTS (vectype));\n@@ -11376,11 +11413,11 @@ vectorizable_load (vec_info *vinfo,\n \t{\n \t if (mask_node)\n \t vec_mask = vec_masks[i];\n-\t if (loop_masks)\n-\t final_mask = vect_get_loop_mask (loop_vinfo, gsi, loop_masks,\n-\t\t\t\t\t vec_num, vectype, i);\n+\t if (vect_fully_masked_p (vinfo, slp_node))\n+\t final_mask\n+\t = vect_get_mask (vinfo, slp_node, gsi, vec_num, vectype, i);\n \t if (vec_mask)\n-\t final_mask = prepare_vec_mask (loop_vinfo, mask_vectype,\n+\t final_mask = prepare_vec_mask (vinfo, mask_vectype,\n \t\t\t\t\t final_mask, vec_mask, gsi);\n \n \t if (i > 0)\n@@ -11426,8 +11463,8 @@ vectorizable_load (vec_info *vinfo,\n \t\tnew_vmode = new_ovmode.require ();\n \t\tunsigned factor\n \t\t = (new_ovmode == vmode) ? 1 : GET_MODE_UNIT_SIZE (vmode);\n-\t\tfinal_len = vect_get_loop_len (loop_vinfo, gsi, loop_lens,\n-\t\t\t\t\t vec_num, vectype, i, factor);\n+\t\tfinal_len = vect_get_len (vinfo, slp_node, gsi, vec_num,\n+\t\t\t\t\t vectype, i, factor);\n \t }\n \t else if (final_mask)\n \t {\ndiff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h\nindex 4849830204d..6fa931e78d2 100644\n--- a/gcc/tree-vectorizer.h\n+++ b/gcc/tree-vectorizer.h\n@@ -681,6 +681,9 @@ public:\n and are reset when undoing patterns. */\n gimple_seq inv_pattern_def_seq;\n \n+ /* Set of vector conditions that have loop mask applied. */\n+ vec_cond_masked_set_type vec_cond_masked_set;\n+\n private:\n stmt_vec_info new_stmt_vec_info (gimple *stmt);\n void set_vinfo_for_stmt (gimple *, stmt_vec_info, bool = true);\n@@ -1016,9 +1019,6 @@ public:\n /* Set of scalar conditions that have loop mask applied. */\n scalar_cond_masked_set_type scalar_cond_masked_set;\n \n- /* Set of vector conditions that have loop mask applied. */\n- vec_cond_masked_set_type vec_cond_masked_set;\n-\n /* If we are using a loop mask to align memory addresses, this variable\n contains the number of vector elements that we should skip in the\n first iteration of the vector loop (i.e. the number of leading\n@@ -2777,8 +2777,7 @@ extern slp_tree vect_create_new_slp_node (unsigned, tree_code);\n extern void vect_free_slp_tree (slp_tree);\n extern bool compatible_calls_p (gcall *, gcall *, bool);\n extern int vect_slp_child_index_for_operand (const gimple *, int op, bool);\n-\n-extern tree prepare_vec_mask (loop_vec_info, tree, tree, tree,\n+extern tree prepare_vec_mask (vec_info *, tree, tree, tree,\n \t\t\t gimple_stmt_iterator *);\n extern tree vect_get_mask_load_else (int, tree);\n extern bool vect_load_perm_consecutive_p (slp_tree, unsigned = UINT_MAX);\n@@ -2914,6 +2913,71 @@ vect_is_reduction (slp_tree slp_node)\n return SLP_TREE_REDUC_IDX (slp_node) != -1;\n }\n \n+/* Return true if VINFO is vectorizer state for loop vectorization and we\n+ still have the option of vectorizing the loop using partially-populated\n+ vectors; or, true if VINFO is for basic-block vectorization and we still have\n+ the option of vectorizing the given SLP_NODE using partial vectors;\n+ otherwise, return false. */\n+inline bool\n+vect_can_use_partial_vectors_p (vec_info *vinfo, slp_tree slp_node)\n+{\n+ loop_vec_info loop_vinfo = dyn_cast<loop_vec_info> (vinfo);\n+ if (loop_vinfo)\n+ return LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo);\n+\n+ (void) slp_node; /* FORNOW */\n+ return false;\n+}\n+\n+/* If VINFO is vectorizer state for loop vectorization then record that we no\n+ longer have the option of vectorizing the loop using partially-populated\n+ vectors; or, if VINFO is for basic-block vectorization then record that we no\n+ longer have the option of vectorizing the given SLP_NODE using partial\n+ vectors. */\n+inline void\n+vect_cannot_use_partial_vectors (vec_info *vinfo, slp_tree slp_node)\n+{\n+ loop_vec_info loop_vinfo = dyn_cast<loop_vec_info> (vinfo);\n+ if (loop_vinfo)\n+ LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo) = false;\n+ else\n+ (void) slp_node; /* FORNOW */\n+}\n+\n+/* Return true if VINFO is vectorizer state for loop vectorization, we've\n+ decided to use partially-populated vectors so that the loop can handle fewer\n+ than VF scalars, and at least one length has been recorded; or, if VINFO is\n+ for basic-block vectorization and SLP_NODE will be vectorized by using\n+ lengths to prevent use of inactive scalar lanes. */\n+inline bool\n+vect_fully_with_length_p (vec_info *vinfo, slp_tree slp_node)\n+{\n+ if (loop_vec_info loop_vinfo = dyn_cast<loop_vec_info> (vinfo))\n+ return LOOP_VINFO_FULLY_WITH_LENGTH_P (loop_vinfo);\n+ else\n+ {\n+ (void) slp_node; /* FORNOW */\n+ return false;\n+ }\n+}\n+\n+/* Return true if VINFO is vectorizer state for loop vectorization, we've\n+ decided to use partially-populated vectors so that the loop can handle fewer\n+ than VF scalars, and at least one mask has been recorded; or, if VINFO is\n+ for basic-block vectorization and SLP_NODE will be vectorized by using masks\n+ to prevent use of inactive scalar lanes. */\n+inline bool\n+vect_fully_masked_p (vec_info *vinfo, slp_tree slp_node)\n+{\n+ if (loop_vec_info loop_vinfo = dyn_cast<loop_vec_info> (vinfo))\n+ return LOOP_VINFO_FULLY_MASKED_P (loop_vinfo);\n+ else\n+ {\n+ (void) slp_node; /* FORNOW */\n+ return false;\n+ }\n+}\n+\n /* If STMT_INFO describes a reduction, return the vect_reduction_type\n of the reduction it describes, otherwise return -1. */\n inline int\n", "prefixes": [ "v9", "01/11" ] }