From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id CEC033858D20; Fri, 14 Apr 2023 07:30:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CEC033858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33E6HbXu031957; Fri, 14 Apr 2023 07:30:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=WvpzglnKg3m6T4pJfhSTqosL91dsLP9rbzUtr6pANJ4=; b=frl2d9jbc1fWVyXdV/cPJpEr6ujPU9W0sXlOgyCA/qk90QwCELAcU8DMpUVZ13qNlSlr HHBXCMH6OB/n76qlXLbAZutcE9dQXTUielWcmL4Z8irmetHrtShiadDNa9JUWbGcFeUV k9N1ZFyRpIMdILocu/TJIuzWF3ITXVCbpCsyqzYJIW7pyiZDGHFkcNI0gqozL+WS8pEh ZFvmaGFO2OChq+924erY6sHAKsRIWxerRlkFLI0vQ3rclAhwGBi/sugKVdV2BmFwsPIb fdgss8hes+W/uNNtadxKNzu+PjgAerNdjtb+YEOcvMPCg0eS0j8X0Zr3VagfTEbpiBLz VA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3pxwfuhbn0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 14 Apr 2023 07:30:33 +0000 Received: from m0098420.ppops.net (m0098420.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 33E6H6Zp006687; Fri, 14 Apr 2023 07:30:32 GMT Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3pxwfuhbm0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 14 Apr 2023 07:30:32 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 33D3PZod026377; Fri, 14 Apr 2023 07:30:31 GMT Received: from smtprelay03.fra02v.mail.ibm.com ([9.218.2.224]) by ppma03ams.nl.ibm.com (PPS) with ESMTPS id 3pu0hdkhcm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 14 Apr 2023 07:30:30 +0000 Received: from smtpav01.fra02v.mail.ibm.com (smtpav01.fra02v.mail.ibm.com [10.20.54.100]) by smtprelay03.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 33E7USHP26608334 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 14 Apr 2023 07:30:28 GMT Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 211EE20043; Fri, 14 Apr 2023 07:30:28 +0000 (GMT) Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2C0F520040; Fri, 14 Apr 2023 07:30:27 +0000 (GMT) Received: from ltcden2-lp1.aus.stglabs.ibm.com (unknown [9.3.90.43]) by smtpav01.fra02v.mail.ibm.com (Postfix) with ESMTP; Fri, 14 Apr 2023 07:30:27 +0000 (GMT) From: Jiufu Guo To: gcc-patches@gcc.gnu.org Cc: segher@kernel.crashing.org, dje.gcc@gmail.com, linkw@gcc.gnu.org, guojiufu@linux.ibm.com Subject: [PATCH] testsuite: update builtins-5-p9-runnable.c for BE Date: Fri, 14 Apr 2023 15:30:26 +0800 Message-Id: <20230414073026.2766449-1-guojiufu@linux.ibm.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: DpzSSDdMtCDOnlTbwH7mPOeXbSR7ZTlT X-Proofpoint-ORIG-GUID: yFUu_7HSd0PFin4AOhQH1p73nhk15H22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-14_02,2023-04-13_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 clxscore=1015 mlxlogscore=999 phishscore=0 mlxscore=0 bulkscore=0 lowpriorityscore=0 impostorscore=0 adultscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304140063 X-Spam-Status: No, score=-10.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,RCVD_IN_MSPIKE_H2,SCC_10_SHORT_WORD_LINES,SCC_5_SHORT_WORD_LINES,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi, As PR108809 mentioned, vec_xl_len_r and vec_xst_len_r are tested in gcc.target/powerpc/builtins-5-p9-runnable.c. The vector operand of these two bifs are different from the view of v16_int8 between BE and LE, even it is same from the view of 128bits(uint128/V1TI). The test case gcc.target/powerpc/builtins-5-p9-runnable.c was written for LE environment, this patch updates it for BE. Tested on ppc64 BE and LE. Is this ok for trunk? BR, Jeff (Jiufu) gcc/testsuite/ChangeLog: * gcc.target/powerpc/builtins-5-p9-runnable.c: Updated. --- .../powerpc/builtins-5-p9-runnable.c | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/gcc/testsuite/gcc.target/powerpc/builtins-5-p9-runnable.c b/gcc/testsuite/gcc.target/powerpc/builtins-5-p9-runnable.c index 14e935513fe..1a5f1d6383a 100644 --- a/gcc/testsuite/gcc.target/powerpc/builtins-5-p9-runnable.c +++ b/gcc/testsuite/gcc.target/powerpc/builtins-5-p9-runnable.c @@ -78,8 +78,13 @@ int main() { size = 8; vec_uc_result1 = vec_xl_len_r(data_uc, size); +#ifdef __LITTLE_ENDIAN__ vec_uc_expected1 = (vector unsigned char){8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0,}; +#else + vec_uc_expected1 = (vector unsigned char){0, 0, 0, 0, 0, 0, 0, 0, + 1, 2, 3, 4, 5, 6, 7, 8,}; +#endif if (result_wrong (vec_uc_expected1, vec_uc_result1)) { @@ -107,8 +112,13 @@ int main() { size = 4; vec_uc_result1 = vec_xl_len_r(data_uc, size); +#ifdef __LITTLE_ENDIAN__ vec_uc_expected1 = (vector unsigned char){ 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; +#else + vec_uc_expected1 = (vector unsigned char){ 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 2, 3, 4 }; +#endif if (result_wrong (vec_uc_expected1, vec_uc_result1)) { @@ -135,8 +145,13 @@ int main() { size = 2; vec_uc_result1 = vec_xl_len_r(data_uc, size); +#ifdef __LITTLE_ENDIAN__ vec_uc_expected1 = (vector unsigned char){ 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; +#else + vec_uc_expected1 = (vector unsigned char){ 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 2 }; +#endif if (result_wrong (vec_uc_expected1, vec_uc_result1)) { @@ -231,8 +246,13 @@ int main() { } /* VEC_XST_LEN_R */ +#ifdef __LITTLE_ENDIAN__ vec_uc_expected1 = (vector unsigned char){ 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 }; +#else + vec_uc_expected1 = (vector unsigned char){ 1, 2, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16 }; +#endif store_data_uc = (vector unsigned char){ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }; vec_uc_result1 = (vector unsigned char){ 0, 0, 0, 0, 0, 0, 0, 0, @@ -265,8 +285,13 @@ int main() { #endif } +#ifdef __LITTLE_ENDIAN__ vec_uc_expected1 = (vector unsigned char){ 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; +#else + vec_uc_expected1 = (vector unsigned char){ 15, 16, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0 }; +#endif store_data_uc = (vector unsigned char){ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }; vec_uc_result1 = (vector unsigned char){ 0, 0, 0, 0, 0, 0, 0, 0, @@ -299,8 +324,13 @@ int main() { #endif } +#ifdef __LITTLE_ENDIAN__ vec_uc_expected1 = (vector unsigned char){ 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 }; +#else + vec_uc_expected1 = (vector unsigned char){ 1, 2, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16 }; +#endif store_data_uc = (vector unsigned char){ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }; vec_uc_result1 = (vector unsigned char){ 0, 0, 0, 0, 0, 0, 0, 0, @@ -333,8 +363,13 @@ int main() { #endif } +#ifdef __LITTLE_ENDIAN__ vec_uc_expected1 = (vector unsigned char){ 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0 }; +#else + vec_uc_expected1 = (vector unsigned char){ 3, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 0, 0 }; +#endif store_data_uc = (vector unsigned char){ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }; vec_uc_result1 = (vector unsigned char){ 0, 0, 0, 0, 0, 0, 0, 0, -- 2.40.0