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 2AF6F384F98E for ; Mon, 4 Dec 2023 12:38:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2AF6F384F98E 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 2AF6F384F98E 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=1701693534; cv=none; b=tfGQOGXgPsB1POe9YOlHPWQdPT1FvrMIM1qWaWXTpq3GblYyblEKO2nCb0mAR3yDpC4Z9GQWhMbsCt2p9fIYsG0ZrpkKGMN6iC4ttiUjmDmLwJcFISY7b5iciEItuq4JqOJU9Oodgmq+rQYF34RcEpHvjEBcPwnycRyKXHsv+y8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701693534; c=relaxed/simple; bh=E/suIXo/hkbIrHuC4qQyMBVcyCtPQFPkVtfYyxIM2d0=; h=DKIM-Signature:Message-ID:Subject:From:To:Date:MIME-Version; b=Xk0NtVDiGrImya3MeZOTpGJMzvBjSK8AqTui6+n35/X7qeq25RwwfMmN1yvD8XedN2DEKddEVE6QDdAAmaPn+m0nW7GrHDs915IZTEPtHz9eeaUxSd/5eApv0adOkJKzIcFpW9XA5u8ogjnh34COgLcbD7lgb9XEUKg8XKZNVMk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1701693532; bh=E/suIXo/hkbIrHuC4qQyMBVcyCtPQFPkVtfYyxIM2d0=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=d8WORH0TKtwkrNm3kQOKMJ4T+/DiCIaBF84VEvZLtY3YsWcBYpLp7G6zZFj8iVzTV LRtz9WGH2+o8z21KcGaCYdYeAm8J6uA/1Rpvnf378vkvW2K8b4r8ce9Nxd6km5M2eZ ssODOM4cv/HQLX8XD9g7dpv5I7IwCdzTwSOj2UxE= 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)) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id B76E866E4E; Mon, 4 Dec 2023 07:38:50 -0500 (EST) Message-ID: Subject: Re: [PATCH v1] LoongArch: Modify the check type of the vector builtin function. From: Xi Ruoyao To: chenxiaolong , gcc-patches@gcc.gnu.org Cc: i@xen0n.name, xuchenghua@loongson.cn, chenglulu@loongson.cn Date: Mon, 04 Dec 2023 20:38:49 +0800 In-Reply-To: <60954f58a9de3494d75899e6dd5cdff7ca2685de.camel@xry111.site> References: <20231204121433.54245-1-chenxiaolong@loongson.cn> <60954f58a9de3494d75899e6dd5cdff7ca2685de.camel@xry111.site> 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.2 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 Mon, 2023-12-04 at 20:31 +0800, Xi Ruoyao wrote: > On Mon, 2023-12-04 at 20:14 +0800, chenxiaolong wrote: > > On LoongArch architecture, using the latest gcc14 in regression test, > > it is found that the vector test cases in vector directory appear FAIL > > entries with unmatched pointer types. In order to solve this kind of > > problem, the type of the variable in the check result is modified with > > the parameter type defined in the vector builtin function. >=20 > IMO we should write something more readable: >=20 > static inline > void ASSERTEQ_64 (int line, const void *_ref, const void *_res) > { > =C2=A0 if (memcmp (_ref, _res, 16) =3D=3D 0) > =C2=A0=C2=A0=C2=A0 return; >=20 > =C2=A0 const char *ref =3D (const char *)_ref; > =C2=A0 const char *res =3D (const char *)_res; >=20 > =C2=A0 printf ("error %s:%d: result mismatch\n", __FILE__, line); >=20 > =C2=A0 printf ("ref:"); > =C2=A0 for (int i =3D 0; i < 16; i++) > =C2=A0=C2=A0=C2=A0 printf (" %02x", ref[i]); Sorry, should be " %02hhx" here. >=20 > =C2=A0 printf ("\nres:"); > =C2=A0 for (int i =3D 0; i < 16; i++) > =C2=A0=C2=A0=C2=A0 printf (" %02x", res[i]); Likewise. > =C2=A0 putchar ('\n'); > =C2=A0 abort (); > } --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University