From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 59771 invoked by alias); 21 Dec 2019 00:06:36 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 59763 invoked by uid 89); 21 Dec 2019 00:06:35 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.7 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_ASCII_DIVIDERS,KAM_SHORT,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy=sk:prefix, sk:prefix-, UD:prefix-si-constant.c, UD:prefix-di-constant.c X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 21 Dec 2019 00:06:34 +0000 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xBKNuVk0053041; Fri, 20 Dec 2019 19:06:32 -0500 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 2x0psehgkv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 20 Dec 2019 19:06:32 -0500 Received: from m0098404.ppops.net (m0098404.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id xBL01G6o074825; Fri, 20 Dec 2019 19:06:32 -0500 Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com with ESMTP id 2x0psehgkk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 20 Dec 2019 19:06:32 -0500 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id xBL05Wrr001740; Sat, 21 Dec 2019 00:06:31 GMT Received: from b03cxnp07028.gho.boulder.ibm.com (b03cxnp07028.gho.boulder.ibm.com [9.17.130.15]) by ppma03dal.us.ibm.com with ESMTP id 2wvqc7tgn8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 21 Dec 2019 00:06:31 +0000 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id xBL06TI940698290 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 21 Dec 2019 00:06:29 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DB1B8C6055; Sat, 21 Dec 2019 00:06:29 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7938AC6057; Sat, 21 Dec 2019 00:06:29 +0000 (GMT) Received: from ibm-toto.the-meissners.org (unknown [9.32.77.177]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTPS; Sat, 21 Dec 2019 00:06:29 +0000 (GMT) Date: Sat, 21 Dec 2019 00:11:00 -0000 From: Michael Meissner To: Michael Meissner , gcc-patches@gcc.gnu.org, Segher Boessenkool , David Edelsohn Subject: [PATCH] V11 patch #8 of 15, Add new tests for using PADDI and PLI with -mcpu=future Message-ID: <20191221000627.GH28993@ibm-toto.the-meissners.org> Mail-Followup-To: Michael Meissner , gcc-patches@gcc.gnu.org, Segher Boessenkool , David Edelsohn References: <20191220231507.GA18386@ibm-toto.the-meissners.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191220231507.GA18386@ibm-toto.the-meissners.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2019-12/txt/msg01497.txt.bz2 This is V10 patch #10. It adds 3 new tests to verify that we generate PADDI/PLI for large constants when -mcpu=future is used. https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00843.html This test passes when the preceeding patches are applied. Can I check this in? 2019-12-20 Michael Meissner * gcc.target/powerpc/prefix-add.c: New test for -mcpu=future generating PADDI for large constant adds. * gcc.target/powerpc/prefix-di-constant.c: New test for -mcpu=future generating PLI to load up large DImode constants. * gcc.target/powerpc/prefix-si-constant.c: New test for -mcpu=future generating PLI to load up large SImode constants. Index: gcc/testsuite/gcc.target/powerpc/prefix-add.c =================================================================== --- gcc/testsuite/gcc.target/powerpc/prefix-add.c (revision 279252) +++ gcc/testsuite/gcc.target/powerpc/prefix-add.c (working copy) @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target powerpc_prefixed_addr } */ +/* { dg-options "-O2 -mdejagnu-cpu=future" } */ + +/* Test that PADDI is generated to add a large constant. */ +unsigned long +add (unsigned long a) +{ + return a + 0x12345678UL; +} + +/* { dg-final { scan-assembler {\mpaddi\M} } } */ Index: gcc/testsuite/gcc.target/powerpc/prefix-di-constant.c =================================================================== --- gcc/testsuite/gcc.target/powerpc/prefix-di-constant.c (revision 279252) +++ gcc/testsuite/gcc.target/powerpc/prefix-di-constant.c (working copy) @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target powerpc_prefixed_addr } */ +/* { dg-options "-O2 -mdejagnu-cpu=future" } */ + +/* Test that PLI (PADDI) is generated to load a large constant. */ +unsigned long +large (void) +{ + return 0x12345678UL; +} + +/* { dg-final { scan-assembler {\mpli\M} } } */ Index: gcc/testsuite/gcc.target/powerpc/prefix-si-constant.c =================================================================== --- gcc/testsuite/gcc.target/powerpc/prefix-si-constant.c (revision 279252) +++ gcc/testsuite/gcc.target/powerpc/prefix-si-constant.c (working copy) @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target powerpc_prefixed_addr } */ +/* { dg-options "-O2 -mdejagnu-cpu=future" } */ + +/* Test that PLI (PADDI) is generated to load a large constant for SImode. */ +void +large_si (unsigned int *p) +{ + *p = 0x12345U; +} + +/* { dg-final { scan-assembler {\mpli\M} } } */ -- Michael Meissner, IBM IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA email: meissner@linux.ibm.com, phone: +1 (978) 899-4797