Message ID | 20250131171232.1018281-31-aleksandar.rakic@htecgroup.com |
---|---|
State | New |
Headers |
Return-Path: <gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 160B73857B9E for <patchwork@sourceware.org>; Fri, 31 Jan 2025 17:35:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 160B73857B9E Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=htecgroup.com header.i=@htecgroup.com header.a=rsa-sha256 header.s=selector1 header.b=s2O060wQ 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-dbaeur03on20718.outbound.protection.outlook.com [IPv6:2a01:111:f403:260d::718]) by sourceware.org (Postfix) with ESMTPS id 587E03858C33 for <gcc-patches@gcc.gnu.org>; Fri, 31 Jan 2025 17:14:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 587E03858C33 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=htecgroup.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=htecgroup.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 587E03858C33 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:260d::718 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1738343658; cv=pass; b=FKne8KREBa+swcHbtXkfsDuWJYtTc/UHAuJE7tEjuGQ1Sr1L7UQRONdS5lGVOSsO5D3alchkToq8+k1j0+VSYnP/GCU5jvWScCU2uIhDno+tsd7I0oA/GsIrnS1ywL2d05fejIpR1PjH1CaZtTNEr66Wvhbg0cdjzdALR5RDxjk= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1738343658; c=relaxed/simple; bh=aEiEDx1lYwjtvrN4Rs9WH2YpTe+jtTYgg35J/uWxaFE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=L4WL92b92cj6YVY6qUtFdAMosHAKNsVZ6JHQZi5QvW1jIWwsckACoJKBYYD5BqYPkT/sNLC6kGRS5x17FUMvNEYKohpuY2glMYr/Kp3cI7u4rZnsShKg0iRqBkl3kL/UgJGXzwv6feiUT0aEZMs5aFuwjqu7dvql75+uxTbRc6s= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 587E03858C33 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=aZmnRTXddtFAJbNcs5PxmfOliScmze0Wl1UErEIZpcst5MvkZma+sgStNxmar5QFMMkwZuB4w4hdqPoLdtYoIC3k2Q1reQN5g6Y6sE0JezuhQJOSCboghG0dwyv2pu4QQh64OBvVd216wa/YgTCR9sStqQNlBDzNWJj598NS+SCkoi2GD96FQqKvulPLhC6OfM3rJlPrFTCKZM6u0Mp1MjvyXhy86ctDpTtlyVrrq6KjkL5cp1jhTTIATemr7e51j/oPnRKHQR286GDt3I6Nr2EYO1caWbLwL4LXid5ygs+1CzF4DHcwzIykeNrKsypRTfu8rp+VI0R99h2Q2Rv2Jg== 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=JDwpUxHlmWZlNb5hkdh0IyB7mVcK1QJ5i5cUCl2vpVE=; b=Bt1nr4nKELkzgjl3exd3jjNUcjOovuYvPKZgm9UlOJtyaUE4rBNUIwU1vm0AGpgRXB+ZIPUiA7BdKRIBOGpc1s6rwJxST3PGtvT42Y1XFPzUmqDK+w1zNoSrI5g4TxpVinTJBZ1s38nShebhRY1HC1cMIN5KbPikC+V1hm987DO91S928y37uxegITtpdoT/lVtLsEuTexhDCEbK1bSbg2e5/yXmHaaOTLajL6r4hhZOojid9f3S+rGIotM2/2HCFxsEdpiZ65hROAgdB1L4DuG6IA8FePeIgLtu9jSGf1OWX1xIz9Lozm2seSQfkF7Uv720vsVW/gaHq1Tw0+cNOw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=htecgroup.com; dmarc=pass action=none header.from=htecgroup.com; dkim=pass header.d=htecgroup.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=htecgroup.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JDwpUxHlmWZlNb5hkdh0IyB7mVcK1QJ5i5cUCl2vpVE=; b=s2O060wQ9ms0nMeMzsIpxlxHDZm2F1gIWnuuooQOhB9/yy7onNGIiMtVeChvpMevtwP+26iFaVFIR1rAfkEv7Fdos7Z6EI4ftaBih5qEh9fSlCtPIxrPF2gqVRaTsS8/jkpyDrjqzPiu7MlRmxb02s/DyI9SEltsD8sK0xpOUHQBTk09w05vZ8eh0Mbm4nAEAdO1bLbebiYLCcJxIhw2noMTaF5/Ku8PftBFwhIbArYsS4vfKoqZAQHiO5YabuG6QueRjBj6ZoSj7RxweTniuKWO3I0tYsMIkbjLPYNEbQJm+bKesFOE32LnVN0aqGb4jMzTQ2PRTPEQPAUz6ZK/qQ== Received: from PA4PR09MB4864.eurprd09.prod.outlook.com (2603:10a6:102:ed::17) by AS2PR09MB6367.eurprd09.prod.outlook.com (2603:10a6:20b:59d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8398.21; Fri, 31 Jan 2025 17:14:04 +0000 Received: from PA4PR09MB4864.eurprd09.prod.outlook.com ([fe80::a02b:9d5c:eca5:e024]) by PA4PR09MB4864.eurprd09.prod.outlook.com ([fe80::a02b:9d5c:eca5:e024%6]) with mapi id 15.20.8398.020; Fri, 31 Jan 2025 17:14:04 +0000 From: Aleksandar Rakic <aleksandar.rakic@htecgroup.com> To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org> CC: Djordje Todorovic <Djordje.Todorovic@htecgroup.com>, "cfu@mips.com" <cfu@mips.com>, Simon Dardis <simon.dardis@imgtec.com>, Mihailo Stojanovic <mistojanovic@wavecomp.com>, Faraz Shahbazker <fshahbazker@wavecomp.com>, Aleksandar Rakic <aleksandar.rakic@htecgroup.com> Subject: [PATCH 29/61] Prevent FP values being spilled to GPRs Thread-Topic: [PATCH 29/61] Prevent FP values being spilled to GPRs Thread-Index: AQHbdAN1ZMoLWhOwfkSNeibw2ZXffg== Date: Fri, 31 Jan 2025 17:13:33 +0000 Message-ID: <20250131171232.1018281-31-aleksandar.rakic@htecgroup.com> References: <20250131171232.1018281-1-aleksandar.rakic@htecgroup.com> In-Reply-To: <20250131171232.1018281-1-aleksandar.rakic@htecgroup.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=htecgroup.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PA4PR09MB4864:EE_|AS2PR09MB6367:EE_ x-ms-office365-filtering-correlation-id: 89e22a66-66b2-41c7-c5ce-08dd421aa9ab x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|376014|366016|1800799024|38070700018; x-microsoft-antispam-message-info: =?iso-8859-1?q?tAR6w0Er5Gnxpry34cEWpBqD/T?= =?iso-8859-1?q?ZE7vcCbeA204N4rNkmpym8k+ZBhSV4Dsot2TsIdw0xrLxowgwZcP5gjcLMWP?= =?iso-8859-1?q?zaFF8vPwP+ZF6wS0tlCclmoFRf9kG1Zy9cF310RI/ht5HXqdNYNMdhWXAtRZ?= =?iso-8859-1?q?4T5nymSyhRPXmWkvl076WSO7Nwl49ewA0M63abOW2vYYdf7yd/lcr+QADG2Z?= =?iso-8859-1?q?xiwLLKYfvgpwH3595fQRQPoMJT0cYlaUwOv3iQIXhheOIP+E0tF0bRglzWqq?= =?iso-8859-1?q?ganuIg/zzlzd3YjD5BY2VjT2ExUSwZDybWBnnxQaH9mHSmc1XVF6WONq8QrM?= =?iso-8859-1?q?5kcCP5Sk77zv20vIt/d18pyMl4ovW7OdiaMK3VaMeNLk0bn2O+1vnaccKlgt?= =?iso-8859-1?q?7yansu1V442EFbNYVPtI0qd0Fx62K4QjvhKgzutk2wHay0qZb6Zl2UucKlRt?= =?iso-8859-1?q?OlFov/+mEQrSyGZ5MfNsgFvYZ8BgKDE3DdltUEuSMxb5D0ZcdUKR2mndI8Oz?= =?iso-8859-1?q?U+Ze8VS0LQ3ZMHbUhO4unu4i97Nkt64pXvwQWgaVvzfVfUn5f7W6NMzhEnrC?= =?iso-8859-1?q?hBxrfWAFI/MciCCZRTdtLea80Ur7yWmRAMcNsq4i1Vnko4N1p9bgLyskfeDo?= =?iso-8859-1?q?J06t86p9zA90yBPr8f5IH3wSz3u8zPAnilMnNGP2HSOiRzu+VHUJkOTvqIrl?= =?iso-8859-1?q?lcj5IHYqWbZSgPVQ6CuAVu0ZmbnPEPI+Pe/lVHsSXmVApYFzYsNxkTAD7po4?= =?iso-8859-1?q?EmIKpOBZBZ8H588w2wMMEB0Uv9paAxDq/Pr+sS3zOENz+l46llpLu41knDqJ?= =?iso-8859-1?q?CMG5d8DM9h2aomR3D5F9yh7z0Cfsc/lmyOPxpjIu4Z9tzqBdVnz+v+xoq7WO?= =?iso-8859-1?q?UmkXuxPuZK1oezwtTWdAsmIVsYv3sxgKGB1qyJmWTlUj6ecR8j2iasq3dT6r?= =?iso-8859-1?q?xJoGDYJxjVC7aifwk8E18mscqOhBCfhHm0kksrJi7SSz2mJJxH5aB39JSIB2?= =?iso-8859-1?q?PqU+RVQQ7KUhZt1989HHCGGn0Q7id/Fh3Rzfo3z5DpBdpnCrkIyuR1rJhl3z?= =?iso-8859-1?q?UDDDeiJxwgIBYlCn/HA7WBD+rC10enRG2OmCp+Y92deSzsL8q7h+TyUlpBMe?= =?iso-8859-1?q?2/oYjvFpnqBk8TclJyJ49mY+c5yRiYuDvCUfl+f1qH4zqYpcoF+4mOWOPtML?= =?iso-8859-1?q?MFxOcGTT1p6rB9mnxnd6cdw5Djql27+8iwgORGA9Hh/+/CVXNphZ9FrqOCQG?= =?iso-8859-1?q?k3HI2N9HD90HJx0Ar0NfrJocyU1wKJZWJy1S98300HcRujpAD5BGjDMb30QB?= =?iso-8859-1?q?HFI3k1gBdwi65pfnw/WLfWmcQJpDS4egZgHxhJw8DMLZg8WlHs155q82Y0Sl?= =?iso-8859-1?q?817FAbaO4UurAXAWvlj1VDkU7jI+4uHfdsV596FVkDALHgy4+pjXe/rorV/i?= =?iso-8859-1?q?rV?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PA4PR09MB4864.eurprd09.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(366016)(1800799024)(38070700018); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?NU0Om+4xj2uy8Grygx1qOBQ?= =?iso-8859-1?q?jyOcbgpuF1NXJYY20LxOVZQHxJXDkWTwvB9dmc75l0sPbF9PFyFPL36XY+Ma?= =?iso-8859-1?q?ZxzCCAlYLh65ZAdmFJM+2n4rah2tioK6ys2oj8mVL7Xru+l+0kTTK8GSh/pt?= =?iso-8859-1?q?+3iKACEwedwjswUiZcUV6RXMrvJRVaIt570DyzIjzwx52yhg9//WWrTK3XO4?= =?iso-8859-1?q?S6zaq3vt7z7Ur7Ad4KY2xx+ko29gAOPPozxc1tmpL14AMWy4tBMfeMMHoA3J?= =?iso-8859-1?q?z3nsF4IokkORd1yuCGNOBksA77Hz8vQrng8fHfgaOr5xGrQM72aiZXHIpiDx?= =?iso-8859-1?q?rFB9C39F73q3lx4iYX8mL4eUCJPJBw0S0CA6yzEHp+vGi9+q9jn+G6VIv6gA?= =?iso-8859-1?q?kYXZTAWQ9vnNPslmqRoNgD5BOeiPj7G4giH9TFRiyFABfeEkeOS6/I0IbURy?= =?iso-8859-1?q?75gQpmTW77808i+Av2tRypC+xGN0wvAUguDWtIBd+QTNe6e6N50/wdlSu/5d?= =?iso-8859-1?q?AIRXi0pOVmGGmdhOd3MTz9gw2gHvkoiVmA+I3efkQ1fwBu9iNwoAVDsXNaLj?= =?iso-8859-1?q?u1GCEHTVvP49M9jrOmsFeO77BuIbonUQXATPWVha59mUpRZ70vgF5EvTRDM5?= =?iso-8859-1?q?syDVq3Qn7u4XdtmAN/PHEgkXr9RtH7dBo23thkE9f34X/T0Qo0IX9IuA7paX?= =?iso-8859-1?q?xHwG/O5MwdgosMR6l/GeHROkwquC7rNypVYtTM+OhRWeosuWwFpsQE62FujN?= =?iso-8859-1?q?0CF5Wtt/KpcvBTkI7As+GpFnK7U0NzMdASDlPlVwNmlZlFXFpyD8bccx9Bqq?= =?iso-8859-1?q?8lcuVmB583HBbXSwv4ML2dRhX/XRpeTxz8mKIJfrcShN+AcUm/tvfIYn6f3z?= =?iso-8859-1?q?/BJU0kcf6a5KpNlBtmmRqQfrZPykYqjeuAYY3G3X7eZw62GG/pLsr+vQidOk?= =?iso-8859-1?q?/kwzYpoAVe+JR243HNe3sFLHmoir/70P8i4wBlcxQaefbQFmrkQVSvS++EDU?= =?iso-8859-1?q?mclKRm4xJPGPtBb//OPW05QVP09NGsAA3vhHJ3bpPQgxq38ywlWox91jORvx?= =?iso-8859-1?q?1D5b6+UWixsBOoUVontkweEmyBXEIWVJyeStqcRutrO8CjZrXkpmXE7yBKe2?= =?iso-8859-1?q?I7ZEUt6Qh0scbhAafQCOAljciYPZwbVpKHVEpKcU5Rx6c0EfKNZ6UmfJOcjg?= =?iso-8859-1?q?nS76Rw9rt6og1wNbnYyUWLmjebbuUiJZzenj1v9zuGt0nNg6YKAAhixecKRl?= =?iso-8859-1?q?vfhloux7hSUEZ1JpSnWKgsX6ZCKuJ8jm1UN7yDzPx+lrF2Qrfo71FfoUfbot?= =?iso-8859-1?q?b444jaHv0pnqq/XZJMl4KB0Ps9qQJnRQ7jb9OXT03/Kkup3BmytQdBc414Tm?= =?iso-8859-1?q?6UgeyHB7+oYHuuj2LRK9iahc2nHV+EjrrhrzEZqe8UG2N7DLtpmElK9i/nHB?= =?iso-8859-1?q?7c6tNPFofnO5fOB2I4/LLLTKx7Aj2a6t+P/vJZ+9r7huOcCsNkmu0iSHnybP?= =?iso-8859-1?q?zjkUcQUIkrQMWeNmJVSCC+kSL2Cpl4ESGvAW/KS3sec/ugf7vy4h0hFxaF1m?= =?iso-8859-1?q?eBmdz79iErUEaAMVA7eAvceQbcbUkxJIU2YodwFFvG4+wW0Pzhpwg9v8D7Oi?= =?iso-8859-1?q?qLDhdBvQVKx1bQLF+P3UOHjm9FxY48OHcMUvpc1nw1/boAXwnYqDBm/Dcubg?= =?iso-8859-1?q?=3D?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: htecgroup.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PA4PR09MB4864.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 89e22a66-66b2-41c7-c5ce-08dd421aa9ab X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Jan 2025 17:13:33.9409 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 9f85665b-7efd-4776-9dfe-b6bfda2565ee X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: GXIgOWQ91B+uUQGklEZfCQXeANKiy9DOWObBNkUL6Md8/6APbVQUkRhn1fAG0W+05J9Ad1wnC8CPZtcXAdW+32GZOFmAUv2/g9slmvF6SRM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR09MB6367 X-Spam-Status: No, score=-13.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, 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 <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~patchwork=sourceware.org@gcc.gnu.org |
Series |
Improve Mips target
|
|
Commit Message
Aleksandar Rakic
Jan. 31, 2025, 5:13 p.m. UTC
From: Simon Dardis <simon.dardis@imgtec.com> gcc/ * config/mips/mips.cc (mips_ira_change_pseudo_allocno_class): Prevent FP modes being reloaded to GPRs. Don't force integer mode pseudos into GR_REGS (and likewise for float mode pseudos and FP_REGS) if both the allocno class and best cost class are ALL_REGS to prevent inefficient scattered complex<float> load with MSA. gcc/testsuite/ * gcc.target/mips/msa-scattered-load.c: New. Cherry-picked 1996aa906aeb4f958b77bb12aa60745ca9962fa2, 5314c36e83e9f8e13144b3a991e392d152514938 and e9b42ac26ee8eeea0f5ca5a54b3b2dca5a69dd71 from https://github.com/MIPS/gcc Signed-off-by: Simon Dardis <simon.dardis@imgtec.com> Signed-off-by: Mihailo Stojanovic <mistojanovic@wavecomp.com> Signed-off-by: Faraz Shahbazker <fshahbazker@wavecomp.com> Signed-off-by: Aleksandar Rakic <aleksandar.rakic@htecgroup.com> --- gcc/config/mips/mips.cc | 16 ++++++++++++--- .../gcc.target/mips/msa-scattered-load.c | 20 +++++++++++++++++++ 2 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 gcc/testsuite/gcc.target/mips/msa-scattered-load.c
diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc index 36ce297085b..1fa727c2ff5 100644 --- a/gcc/config/mips/mips.cc +++ b/gcc/config/mips/mips.cc @@ -25347,7 +25347,7 @@ mips_spill_class (reg_class_t rclass ATTRIBUTE_UNUSED, static reg_class_t mips_ira_change_pseudo_allocno_class (int regno, reg_class_t allocno_class, - reg_class_t best_class ATTRIBUTE_UNUSED) + reg_class_t best_class) { /* LRA will allocate an FPR for an integer mode pseudo instead of spilling to memory if an FPR is present in the allocno class. It is rare that @@ -25357,7 +25357,9 @@ mips_ira_change_pseudo_allocno_class (int regno, reg_class_t allocno_class, to reload into FPRs in LRA. Such reloads are sometimes eliminated and sometimes only partially eliminated. We choose to take this penalty in order to eliminate usage of FPRs in code that does not use floating - point data. + point data. In the case when IRA computes both allocno class and best + cost class as ALL_REGS, do not force integer mode pseudo into GR_REGS + as it is probably best to be placed into FPR. This change has a similar effect to increasing the cost of FPR->GPR register moves for integer modes so that they are higher than the cost @@ -25366,8 +25368,16 @@ mips_ira_change_pseudo_allocno_class (int regno, reg_class_t allocno_class, This is also similar to forbidding integer mode values in FPRs entirely but this would lead to an inconsistency in the integer to/from float instructions that say integer mode values must be placed in FPRs. */ - if (INTEGRAL_MODE_P (PSEUDO_REGNO_MODE (regno)) && allocno_class == ALL_REGS) + if (INTEGRAL_MODE_P (PSEUDO_REGNO_MODE (regno)) && allocno_class == ALL_REGS + && allocno_class != best_class) return GR_REGS; + + /* Likewise for the mirror case of floating mode pseudos being allocated in + a GPR. */ + if (FLOAT_MODE_P (PSEUDO_REGNO_MODE (regno)) && allocno_class == ALL_REGS + && allocno_class != best_class) + return FP_REGS; + return allocno_class; } diff --git a/gcc/testsuite/gcc.target/mips/msa-scattered-load.c b/gcc/testsuite/gcc.target/mips/msa-scattered-load.c new file mode 100644 index 00000000000..f42574ae772 --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/msa-scattered-load.c @@ -0,0 +1,20 @@ +/* { dg-do compile } */ +/* { dg-options "-mfp64 -mhard-float -mmsa" } */ +/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */ + +#include <msa.h> +#include <stddef.h> +#include <complex.h> + +void pgather2cf1(const float complex* from, v4f32* pv, size_t stride) { + v4f32 v; + v[0] = crealf(from[0]); + v[1] = cimagf(from[0]); + v[2] = crealf(from[stride]); + v[3] = cimagf(from[stride]); + *pv = v; +} + +/* { dg-final { scan-assembler-not "mfc1" } } */ +/* { dg-final { scan-assembler-not "mtc1" } } */ +