From patchwork Mon Nov 7 06:45:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: HAO CHEN GUI X-Patchwork-Id: 60042 Return-Path: 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 D48B83858C5E for ; Mon, 7 Nov 2022 06:45:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D48B83858C5E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667803548; bh=aCddG9p6mK1EDgee6yVgB4ARcGjs1cCON300RlmNVtg=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=ADScl/EUoBhC9SiMusvgpSxmrxpSwE0GvGuRzDzNTMo7LQ3Pu5mW5pyAyexoaK373 MFLg2l/zXXu/k1zPZZdOZTDuenQa0vaxzLUYoFvTIZVCJjL1GNtynTzjZbsWII9c65 l+BooskBrIY/wom+K355qnVtX+UsxmDjkxGg4LgQ= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 645923858D37 for ; Mon, 7 Nov 2022 06:45:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 645923858D37 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2A756fj7007058; Mon, 7 Nov 2022 06:45:14 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3kp14wrngt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Nov 2022 06:45:13 +0000 Received: from m0098409.ppops.net (m0098409.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 2A76KRLA030573; Mon, 7 Nov 2022 06:45:13 GMT Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3kp14wrng3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Nov 2022 06:45:13 +0000 Received: from pps.filterd (ppma02fra.de.ibm.com [127.0.0.1]) by ppma02fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2A76ZDvv012592; Mon, 7 Nov 2022 06:45:10 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma02fra.de.ibm.com with ESMTP id 3kngpghgyh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Nov 2022 06:45:10 +0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2A76j7ej65470908 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 7 Nov 2022 06:45:07 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6765C42045; Mon, 7 Nov 2022 06:45:07 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3717E42041; Mon, 7 Nov 2022 06:45:05 +0000 (GMT) Received: from [9.197.242.80] (unknown [9.197.242.80]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 7 Nov 2022 06:45:04 +0000 (GMT) Message-ID: <91d596d0-e4ca-f60f-4fe0-d96e35d62de2@linux.ibm.com> Date: Mon, 7 Nov 2022 14:45:05 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 To: gcc-patches Cc: Segher Boessenkool , David , "Kewen.Lin" , Peter Bergner Subject: [PATCH v4, rs6000] Change mode and insn condition for VSX scalar extract/insert instructions X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: HvFmndkIPXAD6CZ_xRWbcLYb8BN2m1Nb X-Proofpoint-GUID: XnMbjfHMCEzHZN7WMOrNGDGeQV0NFEDE X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-06_16,2022-11-03_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 lowpriorityscore=0 adultscore=0 phishscore=0 malwarescore=0 priorityscore=1501 mlxlogscore=999 mlxscore=0 impostorscore=0 clxscore=1015 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211070055 X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_MSPIKE_H2, 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: HAO CHEN GUI via Gcc-patches From: HAO CHEN GUI Reply-To: HAO CHEN GUI Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Hi, For scalar extract/insert instructions, exponent field can be stored in a 32-bit register. So this patch changes the mode of exponent field from DI to SI. So these instructions can be generated in a 32-bit environment. The patch removes TARGET_64BIT check for these instructiions. The instructions using DI registers can be invoked with -mpowerpc64 in a 32-bit environment. The patch changes insn condition from TARGET_64BIT to TARGET_POWERPC64 for those instructions. This patch also changes prototypes and catagories of relevant built-ins and effective target checks of test cases. Compared to last version, main changes are to set catagories of relevant built-ins from power9-64 to power9 and remove some unnecessary test cases. Last version: https://gcc.gnu.org/pipermail/gcc-patches/2022-September/601196.html Bootstrapped and tested on powerpc64-linux BE and LE with no regressions. Is this okay for trunk? Any recommendations? Thanks a lot. ChangeLog 2022-11-07 Haochen Gui gcc/ * config/rs6000/rs6000-builtins.def (__builtin_vsx_scalar_extract_exp): Set return type to const unsigned int and move it from power9-64 to power9 catatlog. (__builtin_vsx_scalar_extract_sig): Set return type to const unsigned long long. (__builtin_vsx_scalar_insert_exp): Set type of second argument to unsigned int. (__builtin_vsx_scalar_insert_exp_dp): Set type of second argument to unsigned int and move it from power9-64 to power9 catatlog. * config/rs6000/vsx.md (xsxexpdp): Set mode of first operand to SImode. Remove TARGET_64BIT from insn condition. (xsxsigdp): Change insn condition from TARGET_64BIT to TARGET_POWERPC64. (xsiexpdp): Change insn condition from TARGET_64BIT to TARGET_POWERPC64. Set mode of third operand to SImode. (xsiexpdpf): Set mode of third operand to SImode. Remove TARGET_64BIT from insn condition. gcc/testsuite/ * gcc.target/powerpc/bfp/scalar-extract-exp-0.c: Remove lp64 check. * gcc.target/powerpc/bfp/scalar-extract-exp-1.c: Remove lp64 check. * gcc.target/powerpc/bfp/scalar-extract-exp-2.c: Deleted as case is invalid now. * gcc.target/powerpc/bfp/scalar-extract-exp-6.c: Replace lp64 check with has_arch_ppc64. * gcc.target/powerpc/bfp/scalar-extract-sig-0.c: Likewise. * gcc.target/powerpc/bfp/scalar-extract-sig-6.c: Likewise. * gcc.target/powerpc/bfp/scalar-insert-exp-0.c: Replace lp64 check with has_arch_ppc64. Set type of exponent to unsigned int. * gcc.target/powerpc/bfp/scalar-insert-exp-1.c: Set type of exponent to unsigned int. * gcc.target/powerpc/bfp/scalar-insert-exp-12.c: Replace lp64 check with has_arch_ppc64. Set type of exponent to unsigned int. * gcc.target/powerpc/bfp/scalar-insert-exp-13.c: Remove lp64 check. Set type of exponent to unsigned int. * gcc.target/powerpc/bfp/scalar-insert-exp-2.c: Set type of exponent to unsigned int. * gcc.target/powerpc/bfp/scalar-insert-exp-3.c: Remove lp64 check. Set type of exponent to unsigned int. * gcc.target/powerpc/bfp/scalar-insert-exp-4.c: Likewise. * gcc.target/powerpc/bfp/scalar-insert-exp-5.c: Deleted as case is invalid now. patch.diff diff --git a/gcc/config/rs6000/rs6000-builtins.def b/gcc/config/rs6000/rs6000-builtins.def index f76f54793d7..d8d67fa0cad 100644 --- a/gcc/config/rs6000/rs6000-builtins.def +++ b/gcc/config/rs6000/rs6000-builtins.def @@ -2833,6 +2833,11 @@ const signed int __builtin_dtstsfi_ov_td (const int<6>, _Decimal128); TSTSFI_OV_TD dfptstsfi_unordered_td {} + const unsigned int __builtin_vsx_scalar_extract_exp (double); + VSEEDP xsxexpdp {} + + const double __builtin_vsx_scalar_insert_exp_dp (double, unsigned int); + VSIEDPF xsiexpdpf {} [power9-64] void __builtin_altivec_xst_len_r (vsc, void *, long); @@ -2847,19 +2852,13 @@ pure vsc __builtin_vsx_lxvl (const void *, signed long); LXVL lxvl {} - const signed long __builtin_vsx_scalar_extract_exp (double); - VSEEDP xsxexpdp {} - - const signed long __builtin_vsx_scalar_extract_sig (double); + const unsigned long long __builtin_vsx_scalar_extract_sig (double); VSESDP xsxsigdp {} const double __builtin_vsx_scalar_insert_exp (unsigned long long, \ - unsigned long long); + unsigned int); VSIEDP xsiexpdp {} - const double __builtin_vsx_scalar_insert_exp_dp (double, unsigned long long); - VSIEDPF xsiexpdpf {} - pure vsc __builtin_vsx_xl_len_r (void *, signed long); XL_LEN_R xl_len_r {} diff --git a/gcc/config/rs6000/vsx.md b/gcc/config/rs6000/vsx.md index e226a93bbe5..9d3a2340a79 100644 --- a/gcc/config/rs6000/vsx.md +++ b/gcc/config/rs6000/vsx.md @@ -5095,10 +5095,10 @@ (define_insn "xsxexpqp_" ;; VSX Scalar Extract Exponent Double-Precision (define_insn "xsxexpdp" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DF 1 "vsx_register_operand" "wa")] + [(set (match_operand:SI 0 "register_operand" "=r") + (unspec:SI [(match_operand:DF 1 "vsx_register_operand" "wa")] UNSPEC_VSX_SXEXPDP))] - "TARGET_P9_VECTOR && TARGET_64BIT" + "TARGET_P9_VECTOR" "xsxexpdp %0,%x1" [(set_attr "type" "integer")]) @@ -5116,7 +5116,7 @@ (define_insn "xsxsigdp" [(set (match_operand:DI 0 "register_operand" "=r") (unspec:DI [(match_operand:DF 1 "vsx_register_operand" "wa")] UNSPEC_VSX_SXSIG))] - "TARGET_P9_VECTOR && TARGET_64BIT" + "TARGET_P9_VECTOR && TARGET_POWERPC64" "xsxsigdp %0,%x1" [(set_attr "type" "integer")]) @@ -5145,9 +5145,9 @@ (define_insn "xsiexpqp_" (define_insn "xsiexpdp" [(set (match_operand:DF 0 "vsx_register_operand" "=wa") (unspec:DF [(match_operand:DI 1 "register_operand" "r") - (match_operand:DI 2 "register_operand" "r")] + (match_operand:SI 2 "register_operand" "r")] UNSPEC_VSX_SIEXPDP))] - "TARGET_P9_VECTOR && TARGET_64BIT" + "TARGET_P9_VECTOR && TARGET_POWERPC64" "xsiexpdp %x0,%1,%2" [(set_attr "type" "fpsimple")]) @@ -5155,9 +5155,9 @@ (define_insn "xsiexpdp" (define_insn "xsiexpdpf" [(set (match_operand:DF 0 "vsx_register_operand" "=wa") (unspec:DF [(match_operand:DF 1 "register_operand" "r") - (match_operand:DI 2 "register_operand" "r")] + (match_operand:SI 2 "register_operand" "r")] UNSPEC_VSX_SIEXPDP))] - "TARGET_P9_VECTOR && TARGET_64BIT" + "TARGET_P9_VECTOR" "xsiexpdp %x0,%1,%2" [(set_attr "type" "fpsimple")]) diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-0.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-0.c index 35bf1b240f3..a97a2b6ec98 100644 --- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-0.c +++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-0.c @@ -1,9 +1,7 @@ -/* { dg-do compile { target { powerpc*-*-* } } } */ -/* { dg-require-effective-target lp64 } */ -/* { dg-require-effective-target powerpc_p9vector_ok } */ +/* { dg-do compile } */ /* { dg-options "-mdejagnu-cpu=power9" } */ +/* { dg-require-effective-target powerpc_p9vector_ok } */ -/* This test should succeed only on 64-bit configurations. */ #include unsigned int diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-1.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-1.c index 9737762c1d4..1cb438f9b70 100644 --- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-1.c +++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-1.c @@ -1,9 +1,7 @@ /* { dg-do compile { target { powerpc*-*-* } } } */ -/* { dg-require-effective-target lp64 } */ /* { dg-require-effective-target powerpc_p9vector_ok } */ /* { dg-options "-mdejagnu-cpu=power8" } */ -/* This test should succeed only on 64-bit configurations. */ #include unsigned int diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-2.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-2.c deleted file mode 100644 index 53b67c95cf9..00000000000 --- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-2.c +++ /dev/null @@ -1,20 +0,0 @@ -/* { dg-do compile { target { powerpc*-*-* } } } */ -/* { dg-require-effective-target ilp32 } */ -/* { dg-require-effective-target powerpc_p9vector_ok } */ -/* { dg-options "-mdejagnu-cpu=power9" } */ - -/* This test only runs on 32-bit configurations, where a compiler error - should be issued because this builtin is not available on - 32-bit configurations. */ - -#include - -unsigned int -get_exponent (double *p) -{ - double source = *p; - - return scalar_extract_exp (source); /* { dg-error "'__builtin_vsx_scalar_extract_exp' requires the" } */ -} - - diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-6.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-6.c index b9dd7d61aae..136471a35b3 100644 --- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-6.c +++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-6.c @@ -1,7 +1,7 @@ -/* { dg-do run { target { powerpc*-*-* } } } */ -/* { dg-require-effective-target lp64 } */ -/* { dg-require-effective-target p9vector_hw } */ +/* { dg-do run } */ /* { dg-options "-mdejagnu-cpu=power9" } */ +/* { dg-require-effective-target has_arch_ppc64 } */ +/* { dg-require-effective-target p9vector_hw } */ /* This test should succeed only on 64-bit configurations. */ #include diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-0.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-0.c index 637080652b7..3be7eb13566 100644 --- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-0.c +++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-0.c @@ -1,7 +1,7 @@ -/* { dg-do compile { target { powerpc*-*-* } } } */ -/* { dg-require-effective-target lp64 } */ -/* { dg-require-effective-target powerpc_p9vector_ok } */ +/* { dg-do compile } */ /* { dg-options "-mdejagnu-cpu=power9" } */ +/* { dg-require-effective-target has_arch_ppc64 } */ +/* { dg-require-effective-target powerpc_p9vector_ok } */ /* This test should succeed only on 64-bit configurations. */ #include diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-6.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-6.c index c85072da138..b96a745157d 100644 --- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-6.c +++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-6.c @@ -1,7 +1,7 @@ -/* { dg-do run { target { powerpc*-*-* } } } */ -/* { dg-require-effective-target lp64 } */ -/* { dg-require-effective-target p9vector_hw } */ +/* { dg-do run } */ /* { dg-options "-mdejagnu-cpu=power9" } */ +/* { dg-require-effective-target has_arch_ppc64 } */ +/* { dg-require-effective-target p9vector_hw } */ /* This test should succeed only on 64-bit configurations. */ #include diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-0.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-0.c index d8243258a67..7e70d6e2642 100644 --- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-0.c +++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-0.c @@ -1,17 +1,17 @@ -/* { dg-do compile { target { powerpc*-*-* } } } */ -/* { dg-require-effective-target lp64 } */ -/* { dg-require-effective-target powerpc_p9vector_ok } */ +/* { dg-do compile } */ /* { dg-options "-mdejagnu-cpu=power9" } */ +/* { dg-require-effective-target has_arch_ppc64 } */ +/* { dg-require-effective-target powerpc_p9vector_ok } */ /* This test should succeed only on 64-bit configurations. */ #include double insert_exponent (unsigned long long int *significand_p, - unsigned long long int *exponent_p) + unsigned int *exponent_p) { unsigned long long int significand = *significand_p; - unsigned long long int exponent = *exponent_p; + unsigned int exponent = *exponent_p; return scalar_insert_exp (significand, exponent); } diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-1.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-1.c index 8260b107178..a7297319bc4 100644 --- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-1.c +++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-1.c @@ -8,10 +8,10 @@ double insert_exponent (unsigned long long int *significand_p, - unsigned long long int *exponent_p) + unsigned int *exponent_p) { unsigned long long int significand = *significand_p; - unsigned long long int exponent = *exponent_p; + unsigned int exponent = *exponent_p; return __builtin_vec_scalar_insert_exp (significand, exponent); /* { dg-error "'__builtin_vsx_scalar_insert_exp' requires" } */ } diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-12.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-12.c index 384fc9cc675..343620fbe17 100644 --- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-12.c +++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-12.c @@ -1,7 +1,7 @@ -/* { dg-do run { target { powerpc*-*-* } } } */ -/* { dg-require-effective-target lp64 } */ -/* { dg-require-effective-target p9vector_hw } */ +/* { dg-do run } */ /* { dg-options "-mdejagnu-cpu=power9" } */ +/* { dg-require-effective-target has_arch_ppc64 } */ +/* { dg-require-effective-target p9vector_hw } */ /* This test should succeed only on 64-bit configurations. */ #include @@ -9,10 +9,10 @@ double insert_exponent (unsigned long long int *significand_p, - unsigned long long int *exponent_p) + unsigned int *exponent_p) { unsigned long long int significand = *significand_p; - unsigned long long int exponent = *exponent_p; + unsigned int exponent = *exponent_p; return scalar_insert_exp (significand, exponent); } @@ -24,8 +24,8 @@ main () { unsigned long long int significand_1 = 0x18000000000000LL; unsigned long long int significand_2 = 0x1a000000000000LL; - unsigned long long int exponent_1 = 62 + BIAS_FOR_DOUBLE_EXP; - unsigned long long int exponent_2 = 49 + BIAS_FOR_DOUBLE_EXP; + unsigned int exponent_1 = 62 + BIAS_FOR_DOUBLE_EXP; + unsigned int exponent_2 = 49 + BIAS_FOR_DOUBLE_EXP; double x = (double) (0x1800ULL << 50); double z = (double) (0x1a00ULL << 37); diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-13.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-13.c index 0e004224277..6c3b1ccd523 100644 --- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-13.c +++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-13.c @@ -1,18 +1,16 @@ -/* { dg-do run { target { powerpc*-*-* } } } */ -/* { dg-require-effective-target lp64 } */ -/* { dg-require-effective-target p9vector_hw } */ +/* { dg-do run } */ /* { dg-options "-mdejagnu-cpu=power9" } */ +/* { dg-require-effective-target p9vector_hw } */ -/* This test should succeed only on 64-bit configurations. */ #include #include double insert_exponent (double *significand_p, - unsigned long long int *exponent_p) + unsigned int *exponent_p) { double significand = *significand_p; - unsigned long long int exponent = *exponent_p; + unsigned int exponent = *exponent_p; return scalar_insert_exp (significand, exponent); } @@ -24,8 +22,8 @@ main () { unsigned long long int significand_1 = 0x11000000000000LL; unsigned long long int significand_2 = 0x11010000000000LL; - unsigned long long int exponent_1 = 62 + BIAS_FOR_DOUBLE_EXP; - unsigned long long int exponent_2 = 49 + BIAS_FOR_DOUBLE_EXP; + unsigned int exponent_1 = 62 + BIAS_FOR_DOUBLE_EXP; + unsigned int exponent_2 = 49 + BIAS_FOR_DOUBLE_EXP; double *significand_1_ptr = (double *) &significand_1; double *significand_2_ptr = (double *) &significand_2; diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-2.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-2.c index efd69725905..fdaba6b31ff 100644 --- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-2.c +++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-2.c @@ -11,10 +11,10 @@ double insert_exponent (unsigned long long int *significand_p, - unsigned long long int *exponent_p) + unsigned int *exponent_p) { unsigned long long int significand = *significand_p; - unsigned long long int exponent = *exponent_p; + unsigned int exponent = *exponent_p; return scalar_insert_exp (significand, exponent); /* { dg-error "'__builtin_vsx_scalar_insert_exp' requires the" } */ } diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-3.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-3.c index 3ecbe3318e8..c03018782fb 100644 --- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-3.c +++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-3.c @@ -1,17 +1,15 @@ -/* { dg-do compile { target { powerpc*-*-* } } } */ -/* { dg-require-effective-target lp64 } */ -/* { dg-require-effective-target powerpc_p9vector_ok } */ +/* { dg-do compile } */ /* { dg-options "-mdejagnu-cpu=power9" } */ +/* { dg-require-effective-target powerpc_p9vector_ok } */ -/* This test should succeed only on 64-bit configurations. */ #include double insert_exponent (double *significand_p, - unsigned long long int *exponent_p) + unsigned int *exponent_p) { double significand = *significand_p; - unsigned long long int exponent = *exponent_p; + unsigned int exponent = *exponent_p; return scalar_insert_exp (significand, exponent); } diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-4.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-4.c index 1699c67a2f1..e0861f43d86 100644 --- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-4.c +++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-4.c @@ -1,17 +1,15 @@ /* { dg-do compile { target { powerpc*-*-* } } } */ -/* { dg-require-effective-target lp64 } */ /* { dg-require-effective-target powerpc_p9vector_ok } */ /* { dg-options "-mdejagnu-cpu=power8" } */ -/* This test should succeed only on 64-bit configurations. */ #include double insert_exponent (double *significand_p, - unsigned long long int *exponent_p) + unsigned int *exponent_p) { double significand = *significand_p; - unsigned long long int exponent = *exponent_p; + unsigned int exponent = *exponent_p; return __builtin_vec_scalar_insert_exp (significand, exponent); /* { dg-error "'__builtin_vsx_scalar_insert_exp_dp' requires" } */ } diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-5.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-5.c deleted file mode 100644 index f85966a6fdf..00000000000 --- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-5.c +++ /dev/null @@ -1,20 +0,0 @@ -/* { dg-do compile { target { powerpc*-*-* } } } */ -/* { dg-require-effective-target ilp32 } */ -/* { dg-require-effective-target powerpc_p9vector_ok } */ -/* { dg-options "-mdejagnu-cpu=power9" } */ - -/* This test only runs on 32-bit configurations, where a compiler error - should be issued because this builtin is not available on - 32-bit configurations. */ - -#include - -double -insert_exponent (double *significand_p, - unsigned long long int *exponent_p) -{ - double significand = *significand_p; - unsigned long long int exponent = *exponent_p; - - return scalar_insert_exp (significand, exponent); /* { dg-error "'__builtin_vsx_scalar_insert_exp_dp' requires the" } */ -}