From patchwork Sat Dec 21 00:06:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Meissner X-Patchwork-Id: 1214384 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-516418-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="gJPZeNtD"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47fmBF0xm8z9sPV for ; Sat, 21 Dec 2019 11:06:42 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:references:mime-version:content-type :in-reply-to; q=dns; s=default; b=le64JR+J5Xix7p1Zd0wCKSgnGbLGzf dNi1V5i6Hh0xvWjhSjCdwjRSYbtQ0WgHfHr/Hc6pLMiWW6u1tKnGsb4UiUnwGmWd gAW6PFD/ujVhdMKA8AyOWdVsJoc6xcKkVaGnZdoDwsP9ukrK66b20rLwxdC/qfUl dTQvedVkFETZI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:references:mime-version:content-type :in-reply-to; s=default; bh=hDNx7JYuFydB5Bm3X0df/1Spaic=; b=gJPZ eNtD0exGW2QlwxEqV2dNeEDxBIQv86bIXXLldpfXvpIQ8QR+rHM0baybZxdaF7RU 6P9pIc16lw3odW+O+B1xdTHrGTsi1yD9D9TPrAln4NsREPIqbmLs3xnGpODG/Rx9 YGZZhGACMp2A6tpmTrQlP6F7yb64QvRzm7HdeHI= 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-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@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: Fri, 20 Dec 2019 19:06:27 -0500 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-Disposition: inline In-Reply-To: <20191220231507.GA18386@ibm-toto.the-meissners.org> User-Agent: Mutt/1.5.21 (2010-09-15) 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} } } */