From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id 4283D3858C52 for ; Thu, 23 Nov 2023 09:02:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4283D3858C52 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4283D3858C52 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=89.208.246.23 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700730170; cv=none; b=w1HbBUYH0WHU/9NKXa8a90jclaAJZNVTVNN4PGSvXj4ZvrBCqRxPbTXfwL+g5RJDV/89BPjmJbFQGF/FgI7CbHnJtSzGzxdTFvcTW5We6LCaJgcUgzVe1hqMKrTCLS/G0oW9XGCMR4f+d0pXK1lpIiVDiFC/rMswUzoTViPGO3A= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700730170; c=relaxed/simple; bh=3wrAVv9b0i+iWaueBmmAobqgE/jfoN4pJOOx9A8P17E=; h=DKIM-Signature:Message-ID:Subject:From:To:Date:MIME-Version; b=vSuJgQAiG/66n7RVgT5Ib6GBypzzp0KYdv+Q8nnF8r79p1dM/qdd8Iz1WSC7dpCbkA1X3Gr48Xex1MsM52P5zveQiHS2YIfXkrLpnPB/jEv/XOW+DXk1rFp4AxrGF2cwYhht+CywcfdVHSw5YXsKOp5mq3UeFUJXerv4Qo7JBD0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1700730168; bh=3wrAVv9b0i+iWaueBmmAobqgE/jfoN4pJOOx9A8P17E=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=nX5NxQhI6abDVxnjRLX9bA4Vx8aiNT6iwaM7jqJoLNTcwtbPkIyz51+jXrpCJb5di HNJUjxyFwhv1hg3I4sdRsSdjtQ6Yf1443EmaEcKlR718TT6mc/sFL30VPODpWZ6rlw t2quH1/PJL3TYU/bDRD9mIQZ0u5Hyov2FIb4MXOU= Received: from [127.0.0.1] (unknown [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 5066766B3A; Thu, 23 Nov 2023 04:02:47 -0500 (EST) Message-ID: Subject: Re: [PATCH v3 1/5] LoongArch: Fix usage of LSX and LASX frint/ftint instructions [PR112578] From: Xi Ruoyao To: chenglulu , gcc-patches@gcc.gnu.org Cc: i@xen0n.name, xuchenghua@loongson.cn Date: Thu, 23 Nov 2023 17:02:44 +0800 In-Reply-To: <9ce7e0b2-eeeb-a8c5-2cc7-e9b65b1b2a6b@loongson.cn> References: <20231120004728.205167-1-xry111@xry111.site> <20231120004728.205167-2-xry111@xry111.site> <2d1c9d59544d15ef7fba07d758431da840cc0bfe.camel@xry111.site> <9ce7e0b2-eeeb-a8c5-2cc7-e9b65b1b2a6b@loongson.cn> Autocrypt: addr=xry111@xry111.site; prefer-encrypt=mutual; keydata=mDMEYnkdPhYJKwYBBAHaRw8BAQdAsY+HvJs3EVKpwIu2gN89cQT/pnrbQtlvd6Yfq7egugi0HlhpIFJ1b3lhbyA8eHJ5MTExQHhyeTExMS5zaXRlPoiTBBMWCgA7FiEEkdD1djAfkk197dzorKrSDhnnEOMFAmJ5HT4CGwMFCwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQrKrSDhnnEOPHFgD8D9vUToTd1MF5bng9uPJq5y3DfpcxDp+LD3joA3U2TmwA/jZtN9xLH7CGDHeClKZK/ZYELotWfJsqRcthOIGjsdAPuDgEYnkdPhIKKwYBBAGXVQEFAQEHQG+HnNiPZseiBkzYBHwq/nN638o0NPwgYwH70wlKMZhRAwEIB4h4BBgWCgAgFiEEkdD1djAfkk197dzorKrSDhnnEOMFAmJ5HT4CGwwACgkQrKrSDhnnEOPjXgD/euD64cxwqDIqckUaisT3VCst11RcnO5iRHm6meNIwj0BALLmWplyi7beKrOlqKfuZtCLbiAPywGfCNg8LOTt4iMD Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.1 MIME-Version: 1.0 X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,LIKELY_SPAM_FROM,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Thu, 2023-11-23 at 16:13 +0800, chenglulu wrote: > The fix_truncv4sfv4si2 template is indeed called when debugging with > gdb. >=20 > So I think we can use define_expand here. The problem is cases where we want to combine an rint call with float- to-int conversion: float x[4]; int y[4]; void test() { for (int i =3D 0; i < 4; i++) y[i] =3D __builtin_rintf(x[i]); } With define_expand we get "vfrint + vftintrz", but with define_insn we get a single "vftint". Arguably the generic code should try to handle this (PR86609), but it's "not sure if that's a good idea in general" (comment 1 in the PR) so we can do this in a target-specific way. --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University