From patchwork Wed Oct 2 12:31:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dusan Stojkovic X-Patchwork-Id: 1992003 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=rt-rk.com header.i=@rt-rk.com header.a=rsa-sha256 header.s=s2021 header.b=cyTlRj/y; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XJZ1w6gRKz1xtY for ; Wed, 2 Oct 2024 22:32:04 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B5D553858289 for ; Wed, 2 Oct 2024 12:32:02 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx07-0061a602.pphosted.com (mx07-0061a602.pphosted.com [143.55.144.161]) by sourceware.org (Postfix) with ESMTPS id 98B723858D33; Wed, 2 Oct 2024 12:31:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 98B723858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=rt-rk.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rt-rk.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 98B723858D33 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=143.55.144.161 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1727872301; cv=pass; b=dy6eeV5udtbMlQ1iorr+p6NYlvrI9f5BFsWaoDMU7sfyGRdeVopL8kkcZNow5BbDjxugrxP/iXBGUjKdlVOWUkXjZWMqgm0SK2u8ak5T5wxDHyKVSmcXD1lHNL1VOQojEVlaBKPuh5HdKRzhu5UdFEyuw77SlyVLMf8WFvmIZSU= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1727872301; c=relaxed/simple; bh=snYqln9YqH5YKIrkB8KzFZEiM1LwW2twQEXnZJB5/Bk=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=p8eHKh+NYl1Qoimr37Fhn/11YyXbJOeq9+voAyl8Gj2VS+7eSNp+LUxHdU/mZ1eOsYlvZb0lDYEBaHbXWy47gFSySsrY0d2qsvu+q+THdBFdGROk1pRw/gf6GENoIyhQvWPr2PyXvoxl6R1+RO7wQYTadM4CpV6Pm6BtXv0BCQs= ARC-Authentication-Results: i=2; server2.sourceware.org Received: from pps.filterd (m0278995.ppops.net [127.0.0.1]) by mx07-0061a602.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 492BCqfk032037; Wed, 2 Oct 2024 12:31:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rt-rk.com; h=cc :content-type:date:from:message-id:mime-version:subject:to; s= s2021; bh=TGWBrgjTf3hKy+rFS1zzZahUD4wxA7Xx8ayQkVRbOYg=; b=cyTlRj /yVk5Caz0/Pai+vo2NOmbd0bXBoOIZoRMC0yo1PMc08U3XB6kdpP5ZBYnpuUZnqa sjTMUoI6yvmAmNgvRpquqMgkVGApHkkP0pnQH1RpoqGD0Mw2XtjIUyS9XLFY21XG V414ESSCgLuRJ7C//YZ0DygXpsSsPINDas4jLtoFF2eE4xN1Bg5xhQj40N0WjNMd 0+hGtNjVZnOEwhjEs2jd/wDIdJqbkNu7RA8b335eaaPsO91JlJ/w9SATl9PtwZKT IWNbWEYZyb035/LCa34EmcjFgpQ+j0QluU0jrEbZtlsXlv7H5erZL6pe9FdNdmS8 gd9atFzrMulW73lw== Received: from eur05-vi1-obe.outbound.protection.outlook.com (mail-vi1eur05lp2171.outbound.protection.outlook.com [104.47.17.171]) by mx07-0061a602.pphosted.com (PPS) with ESMTPS id 420exha6pt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Oct 2024 12:31:36 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=OYVw/xcTivfA1rSmm+L2VQ9VQ+TpbhX9wOtWNYbDA64Q2AhXz75I9iIjwil9rrivx4Sp2lRxf+RUf/aF5PLvW+NS8+CZ94+dej+alKsbb0RovI0Ib5ei42tDGbIrTt4DcR3ipHrzldJyvv12yjaN8gRXCyuE15sGCka8hRYc7BmBf3hLEOG5UtFhIhKwrBJ0K4zviq3nrjG8H/klSkFunJWBKF37ahraLBP5x0N3NEsH+aKI8N+bTB+Ndur/tDYqiNW1J8NRmTO30taaOF30YLSXMlLlqm4A/sOWohBa1pIT1PiLiH94dvWUQbQt/s7QeZcLliPkdjAypoEVeLYoRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=TGWBrgjTf3hKy+rFS1zzZahUD4wxA7Xx8ayQkVRbOYg=; b=cG/262iIyWsvnrg48in32g4bc4ls60KRPmq6ajIRI3frJvaP2zvYuaZWKYupQJ2+MICFndCB/Hj+y+S4NKVSMWmucGPxl2KvVXAxUILoH+cfvAc2wAPxxAz2xSS+AqZKrQr37xPYkGumFtAYzidERaketL+SJPHyO4ja439w0z6QTOlaSwhrPuwfBvi2Whs/hOa4L4VDM2joN9hGfz9xukla7/ibAMEM3Bkl+kYdpcVAT6DheetnYkgfF2ST+T1Sh5SsM5j1k1XK0YA8l8S7IPZcwhUZA1aMzgEafPr2Y7hhRZIPz1hnrtkuIfHTR3kYFcvuhkn0Qxpe8nceS3RoaQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=rt-rk.com; dmarc=pass action=none header.from=rt-rk.com; dkim=pass header.d=rt-rk.com; arc=none Received: from PR3PR08MB5738.eurprd08.prod.outlook.com (2603:10a6:102:81::7) by GVXPR08MB11211.eurprd08.prod.outlook.com (2603:10a6:150:1fa::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.16; Wed, 2 Oct 2024 12:31:29 +0000 Received: from PR3PR08MB5738.eurprd08.prod.outlook.com ([fe80::1ff6:cc35:8eb0:bd1b]) by PR3PR08MB5738.eurprd08.prod.outlook.com ([fe80::1ff6:cc35:8eb0:bd1b%4]) with mapi id 15.20.7939.010; Wed, 2 Oct 2024 12:31:29 +0000 From: Dusan Stojkovic To: GCC Patches CC: "law@gcc.gnu.org" , Robin Dapp Subject: [PATCH v2] RISC-V: Improve vsetvl vconfig alignment Thread-Topic: [PATCH v2] RISC-V: Improve vsetvl vconfig alignment Thread-Index: AQHbFMbIaqlvyTi6T06b8XotH0LOOw== Date: Wed, 2 Oct 2024 12:31:29 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: msip_labels: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PR3PR08MB5738:EE_|GVXPR08MB11211:EE_ x-ms-office365-filtering-correlation-id: 66dd5e89-672f-4119-2012-08dce2de2410 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|366016|376014|1800799024|38070700018; x-microsoft-antispam-message-info: =?iso-8859-1?q?FZINcDBSpWS8QnjlXJZldtf+ee?= =?iso-8859-1?q?6F1UrueVkZiaHgERD52La0hxRHCDX91HRFi4YIcYCVGlj8wPwf8xOnG13jl/?= =?iso-8859-1?q?HOgouOYzuF5XvLzRB2QWAwFO2yLMnkzady4UJTayz7sALZRV2t2P73/9/e6W?= =?iso-8859-1?q?u7EzQrN6p5tIuI/ZWb0HT7h8PXk3/0YTcJk4r4bQkdpRD3oA8MQ38koNEHfa?= =?iso-8859-1?q?66f3ukGezqUSrtITkjwXY0cH02ar1afR/p4BbcituMOg9UTBRsivCJJ4BWRt?= =?iso-8859-1?q?CnjkQ9LmbsqIwAp3BbSmbfksBl3H7RP8BFGRNH9hO2PX/F4nm0IH+fVVHO/J?= =?iso-8859-1?q?EIC/MCYxfHuc8y+sSWIErpK2zSBq2nF5PrLpOZ6W+lVBU/wxNl3nKSg+5rkd?= =?iso-8859-1?q?SSQ+tkpkJyaEwz7DN6WEG1bXR9PolhamWdzvVvoLwrwT9KUt/G45XuqM3xHQ?= =?iso-8859-1?q?MJF4R+lwF8PKfcJLzm0iu7Fbw/mOHEKt7SBm7lmMu/bASovic+eEY7SwLIcq?= =?iso-8859-1?q?p3Zh+wYfqQcd1xYQvgBhEdT6OGS6jpmCclNkEowBjtzb1mxfClZnN1zWIOje?= =?iso-8859-1?q?scRZhmYdRyajIIn/5K3eeuMFDd7afghjeRYXE0o5eRaG/eA7QzExfGQRPCVp?= =?iso-8859-1?q?dqYINzsQocI1krAEpGqO6B4TvX7TaqByxFqK9ILTdq/ku4IV3D0Za5pSm+47?= =?iso-8859-1?q?9a8ZhYgJ+EtaxWYpxNGrzJiwrY2jC8WSWWqvDb/XbhzCMGq7bbn2gG8SfJuL?= =?iso-8859-1?q?WAtP83ymmYd6HOj9868wEYkm96sOj6oful8yZGe2aPgeeGHb7U96/1mE5RD1?= =?iso-8859-1?q?j3UXbSidUvWuMIGbIjWAeCBO+KOUrFLuiI1Vvi5xRXOnWcTntkR5T2l7S7AF?= =?iso-8859-1?q?6Ut6XfdlCajo+wn7kQCadSZLAlrnQIAANFYnoSfDWbdrQG+H2hJAZlHf5KMk?= =?iso-8859-1?q?PjZc//5KtQ3ON4bNzduPOJrNS7FPq2iRsWZ7hUPpR5PFS+rZg4Ec83UPFeHl?= =?iso-8859-1?q?THPmxbYKqq5YkTHSFcln0j9dhxXlojwERhOkhQbL88oorrXwEbh092BOBjXV?= =?iso-8859-1?q?S4oICCzbixqPIfJ2FGUcTaTWq6YrwBAhHB+AkAVZypDT1QMpnL2wV+co//Si?= =?iso-8859-1?q?U994Uik0JRjzB1zHVRx7dXgOLs1dr0Bm4+NedFn7ERaFDcDkpJtYSfaDuwnf?= =?iso-8859-1?q?N/i0dneRsSXLWuA9lmuhkarG61GZYkB0iOf6IgSXJxlvfgMLIO4cqzDjW584?= =?iso-8859-1?q?XhGUT+uTuMaAoWIgIHnuRN7rPyOG7OEQQtyqVRzq21OOOGtWR1qWm+7gPACX?= =?iso-8859-1?q?QTBaOp0MgSvSOwyFPTSSkUAhZmYBKN5xDAWYg=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PR3PR08MB5738.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(376014)(1800799024)(38070700018); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?AqbBzgJ9wrfk7b/r5qdj8Y6?= =?iso-8859-1?q?ZCPLLoZcctCWI/oAm8R/rmHGVRWNteLajPNdYVeseA+ILIw1TxkgrLERtCuq?= =?iso-8859-1?q?VzakZEP73bmn914uNcJ3Qn2uD08Wij8H7k/5UgMlyaYRLncbPZjHipgMcu/5?= =?iso-8859-1?q?HuCWTO4sYyUhXWtCQIVmdXviXw4obOFAkq4jIMy+HXV6XAWeo0Gg/cuxdjQb?= =?iso-8859-1?q?J5yaQsB+4FIGtRRG3hDOt47HvJ+NKnwuOizSvla/Sa0TdIWqdzkMqDCvQ40K?= =?iso-8859-1?q?WqJ/HxytdQ5l76w1N/5tCKvdiO1AowzBmjZNqh0dNQtF6h8Dx5/A+3ULX/NI?= =?iso-8859-1?q?rbgDQgh6TdKwltFjXo+ySOb8FeislVkIrv8rNvG2oA0FP8wa181LIDpnnGLW?= =?iso-8859-1?q?FEgBP+f4TMtjywGaNzpzjjTxEav/mDUnn6OZPpgAoW1jQtkzxHPm40RczcqW?= =?iso-8859-1?q?vn/i9BPrBV5AGQzrj3qur6kzAgZST3vKqvuQV71iSeYbfaqG/y/mHibaj6tC?= =?iso-8859-1?q?jWph3ZLG37H8HiR6e9AdV0Tx7QCC9BU7v5SPB7Qq6/MKJgezPDw6fJ8Sh1Kx?= =?iso-8859-1?q?PGjSTJg57m8NRtsTGAsoxwMVnePI39CvhUozyjtgCpCYoD+Hn8g2IWtr4ytn?= =?iso-8859-1?q?c8OdtMlZ1zSWcq8pi25YkHbHlM5GNccF5AL+s8biw45blpg2loVkG+EuvZCD?= =?iso-8859-1?q?76+Z5PSS6kVO++7O5ewAYbHJ7JAhiDhsYTDCNcEhQnuMOYjYfsENtZi7vcVR?= =?iso-8859-1?q?H8nXRFv+TYQxv0mSh1iXHRH/e+W1uR2aJUNmwpGwrHfsHcZUTuTrnLibDha1?= =?iso-8859-1?q?EiZLjMxG1gkmgoDNWrfCkql27JAd772ge78UxlfU1AxScjveF5GQoBco4mWX?= =?iso-8859-1?q?A0cx5Jq2kxoF/9/2BZRnnj3XMAd4ENfx6Ez5P85XSbdiKLjkcs6dPKFIrVOy?= =?iso-8859-1?q?xCVqMlz+Jav/gIB38537Ix7AxehuBszbaAsCpAqwAEokObOpt5wnGDxEK1Up?= =?iso-8859-1?q?Mag8VvQST7HfD0l/r6EjYZYlJzmuG5qyEO7BAM+6+MBSTVsrAUwQZA3mUeMW?= =?iso-8859-1?q?ne0eVz+6noCHIxKN2Q9O/GsYCpCb0XD2ZVG3lEUV7utU6aoN6/XNcdRHnZHr?= =?iso-8859-1?q?onVJX97suXate3ZHfLqJ3yF9T9qFL3ri+ouqnnK6InqOBX6KCudND4kMrtx0?= =?iso-8859-1?q?Grlcpo9ZJ4yFGjr/yTbCnfUwke4z9bTERTKXieOniVyZEVzaP7JYQm2tu/p5?= =?iso-8859-1?q?bMnkOrKhyGg7opvlG3ElzQM9HK/yxSogEU9+s9BTH9m5xQb+zw8P7SyNUt5I?= =?iso-8859-1?q?/GYdBiRXSO64Pa0YH8Ab1SPITEh/g24l+j4k6vrocMPqjEOo22XnFEwfH2i7?= =?iso-8859-1?q?IOogH8Dti5525+Ht1fg1qEPBCgpR7kmXyF8IOGNaNrf2N6CKmhI8ZgOksWwF?= =?iso-8859-1?q?2hgFZpM5IGPZmcYLu12RaPnViuoSxZmyAIXWBPiaEYG4Mhyy3acHtcpQzGDd?= =?iso-8859-1?q?4QF0uZr8TT5chO+y1BQLKn0VMjcvGxfpV8vlQsd1Dm1oLOmL0Z3BMpHvRfHl?= =?iso-8859-1?q?A1SZmH2eAwLjOuP+eNliI3EqswAgRLOZrqNOrVF4Ik+fd134GGU/2gH8zAmD?= =?iso-8859-1?q?8b8MZovMPcpj9CbD5?= MIME-Version: 1.0 X-OriginatorOrg: rt-rk.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PR3PR08MB5738.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 66dd5e89-672f-4119-2012-08dce2de2410 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Oct 2024 12:31:29.5291 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 9bc3ed46-a3ca-43f0-b84e-9a557209a7df X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: I8fGpflyBkE1EjIA7l/wJBxtp1iAfk3iujq8rnz0bFCfNx7z086lgh9DfF4kJx8YCnKtFFFXvGghgeFalrTFFIjiHnWYR1gTeunFf4nFhr0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR08MB11211 X-Authority-Analysis: v=2.4 cv=F/8FdbhN c=1 sm=1 tr=0 ts=66fd3d29 cx=c_pps a=wFwJJdDE3Ru3YJTEyBcntg==:117 a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=xqWC_Br6kY4A:10 a=DAUX931o1VcA:10 a=bp5mhLeJ-vUA:10 a=mDV3o1hIAAAA:8 a=wT45_P3iAAAA:8 a=jXuQHcAsHH7lK8CqaSQA:9 a=wPNLvfGTeEIA:10 a=0MUuhMLfY64A:10 a=Ix7ccVzOkkdQnGk7eCoA:9 a=8PCGLSYl0hmOb9WH:21 a=frz4AuCg-hUA:10 a=_W_S_7VecoQA:10 a=enotwCFOg6owCIgCTZoA:9 a=m-Z_27IZkzAA:10 a=RJRP_u8kRGsxlTjV8B5_:22 X-Proofpoint-ORIG-GUID: 5XrgDGNttfw596Vq_Iq0xEJdnpvQT9dR X-Proofpoint-GUID: 5XrgDGNttfw596Vq_Iq0xEJdnpvQT9dR X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, HTML_MESSAGE, KAM_SHORT, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org This patch is a new version of: https://gcc.gnu.org/pipermail/gcc-patches/2024-September/662745.html > Can you elaborate a bit on that? Rearranging the CFG shouldn't matter > in general and relying on the specific TARGET_SFB_ALU feels overly > specific. > Why does the same register in the if_then_else and interfere with vsetvl? When ce1 pass transforms CFG in the case of the conditional move, it deletes then and else basic blocks and in their place adds the conditional move which uses the same pseudo-register as the original vsetvl. This interferes with vsetvl pass precisely because of the merge policy. Use by non rvv flag limits the cases where merging might still be possible. This patch tries to addresses one such issue. Agreed. I have removed TARGET_SFB_ALU flag from the condition. > BTW Bohan Lei has since fixed a bug regarding non-RVV uses. Does the > situation change with that applied? Repeated the testing for sifive-7-series as well as rocket. The same tests are still effected positively: vsetvlmax-9, vsetvlmax-10, vsetvlmax-11, vsetvlmax-15 on sifive-7-series. 2024-10-2 Dusan Stojkovic PR target/113035 gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (pre_vsetvl::earliest_fuse_vsetvl_info): New fuse condition. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/vsetvl/vsetvlmax-15.c: Updated scan-assembler-times num parameter. CONFIDENTIALITY: The contents of this e-mail are confidential and intended only for the above addressee(s). If you are not the intended recipient, or the person responsible for delivering it to the intended recipient, copying or delivering it to anyone else or using it in any unauthorized manner is prohibited and may be unlawful. If you receive this e-mail by mistake, please notify the sender and the systems administrator at straymail@rt-rk.com immediately. --- gcc/config/riscv/riscv-vsetvl.cc | 24 +++++++++++++++++++ .../riscv/rvv/vsetvl/vsetvlmax-15.c | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/gcc/config/riscv/riscv-vsetvl.cc b/gcc/config/riscv/riscv-vsetvl.cc index 030ffbe2ebb..e2a5231333f 100644 --- a/gcc/config/riscv/riscv-vsetvl.cc +++ b/gcc/config/riscv/riscv-vsetvl.cc @@ -3061,6 +3061,30 @@ pre_vsetvl::earliest_fuse_vsetvl_info (int iter) else { vsetvl_info &prev_info = src_block_info.get_exit_info (); + if (prev_info.valid_p () + && curr_info.valid_p () + && prev_info.vl_used_by_non_rvv_insn_p () + && !curr_info.vl_used_by_non_rvv_insn_p ()) + { + // Try to merge each demand individually + if (m_dem.sew_lmul_compatible_p (prev_info, curr_info)) + { + m_dem.merge_sew_lmul (prev_info, curr_info); + } + if (m_dem.policy_compatible_p (prev_info, curr_info)) + { + m_dem.merge_policy (prev_info, curr_info); + } + if (dump_file && (dump_flags & TDF_DETAILS)) + { + fprintf (dump_file, " After fusing curr info and " + "prev info demands individually:\n"); + fprintf (dump_file, " prev_info: "); + prev_info.dump (dump_file, " "); + fprintf (dump_file, " curr_info: "); + curr_info.dump (dump_file, " "); + } + } if (!prev_info.valid_p () || m_dem.available_p (prev_info, curr_info) || !m_dem.compatible_p (prev_info, curr_info)) diff --git a/gcc/testsuite/gcc.target/riscv/rvv/vsetvl/vsetvlmax-15.c b/gcc/testsuite/gcc.target/riscv/rvv/vsetvl/vsetvlmax-15.c index 23042460885..65aceed0e4e 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/vsetvl/vsetvlmax-15.c +++ b/gcc/testsuite/gcc.target/riscv/rvv/vsetvl/vsetvlmax-15.c @@ -18,6 +18,6 @@ void foo(int32_t *in1, int32_t *in2, int32_t *in3, int32_t *out, size_t n, int c } } -/* { dg-final { scan-assembler-times {vsetvli\s+[a-x0-9]+,\s*zero,\s*e32,\s*m1,\s*t[au],\s*m[au]} 1 { target { no-opts "-O0" no-opts "-Os" no-opts "-g" no-opts "-funroll-loops" } } } } */ +/* { dg-final { scan-assembler-times {vsetvli\s+[a-x0-9]+,\s*zero,\s*e32,\s*m1,\s*t[au],\s*m[au]} 2 { target { no-opts "-O0" no-opts "-Os" no-opts "-g" no-opts "-funroll-loops" } } } } */ /* { dg-final { scan-assembler-times {vsetvli} 3 { target { no-opts "-O0" no-opts "-Os" no-opts "-g" no-opts "-funroll-loops" } } } } */ /* { dg-final { scan-assembler-times {slli\s+[a-x0-9]+,\s*[a-x0-9]+,\s*5} 1 { target { no-opts "-O0" no-opts "-Os" no-opts "-g" no-opts "-funroll-loops" } } } } */