From patchwork Mon Apr 27 19:48:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Meissner X-Patchwork-Id: 1277887 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=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=Y2YgN7/j; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 499wM40qBsz9sSK for ; Tue, 28 Apr 2020 05:48:48 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2DF18388B014; Mon, 27 Apr 2020 19:48:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2DF18388B014 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1588016926; bh=RzXaZGgaJoSvusXPsNWG/GNSGY8pkr5VcTFXrKSIwJQ=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=Y2YgN7/jGEhZxtpAN/ibCFk88AW7YDkdpsfR4OklIxs/MCXnMS7fBXHMcsIFw6B2l VQODdCLYgJ/bU7l/BTqBGW3rKJmbhl2V9UToOeITkhgzo0Qa+gL8t4xmLnhgmB9t15 JprhnLV3a7jEp25GlG7C71qF49m1nX9HJx2S67Bk= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id B63AA3858D32 for ; Mon, 27 Apr 2020 19:48:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B63AA3858D32 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 03RJW9ck086210; Mon, 27 Apr 2020 15:48:43 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 30me4vv8js-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 27 Apr 2020 15:48:43 -0400 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 03RJc5w9100778; Mon, 27 Apr 2020 15:48:42 -0400 Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0b-001b2d01.pphosted.com with ESMTP id 30me4vv8jh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 27 Apr 2020 15:48:42 -0400 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 03RJjcJU001723; Mon, 27 Apr 2020 19:48:42 GMT Received: from b01cxnp23032.gho.pok.ibm.com (b01cxnp23032.gho.pok.ibm.com [9.57.198.27]) by ppma04dal.us.ibm.com with ESMTP id 30mcu6b9ku-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 27 Apr 2020 19:48:42 +0000 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 03RJmfnk49348944 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 27 Apr 2020 19:48:41 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5BAA7AE05C; Mon, 27 Apr 2020 19:48:41 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 39358AE062; Mon, 27 Apr 2020 19:48:41 +0000 (GMT) Received: from ibm-tinman.the-meissners.org (unknown [9.85.199.222]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTPS; Mon, 27 Apr 2020 19:48:41 +0000 (GMT) Date: Mon, 27 Apr 2020 15:48:39 -0400 To: Michael Meissner , gcc-patches@gcc.gnu.org, Segher Boessenkool , David Edelsohn Subject: [PATCH] PowerPC -mcpu=future Patch 2 of 7, Add PLI/PADDI tests Message-ID: <20200427194839.GB24986@ibm-tinman.the-meissners.org> Mail-Followup-To: Michael Meissner , gcc-patches@gcc.gnu.org, Segher Boessenkool , David Edelsohn References: <20200427194305.GA24600@ibm-tinman.the-meissners.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200427194305.GA24600@ibm-tinman.the-meissners.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.676 definitions=2020-04-27_14:2020-04-27, 2020-04-27 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 adultscore=0 lowpriorityscore=0 priorityscore=1501 malwarescore=0 mlxlogscore=999 suspectscore=0 impostorscore=0 bulkscore=0 spamscore=0 mlxscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004270153 X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Michael Meissner via Gcc-patches From: Michael Meissner Reply-To: Michael Meissner Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Add tests for generating PLI/PADDI with -mcpu=future. This is patch #2 of 7. This patch was run on a little endian power8 system running Linux and the patches succeeded. 2020-04-27 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. --- /tmp/V53gPm_prefix-add.c 2020-04-27 13:51:49.231124761 -0400 +++ gcc/testsuite/gcc.target/powerpc/prefix-add.c 2020-04-27 13:51:38.392270487 -0400 @@ -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} } } */ --- /tmp/5x1erh_prefix-di-constant.c 2020-04-27 13:51:49.239124653 -0400 +++ gcc/testsuite/gcc.target/powerpc/prefix-di-constant.c 2020-04-27 13:51:38.396270434 -0400 @@ -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} } } */ --- /tmp/NGLE4b_prefix-si-constant.c 2020-04-27 13:51:49.246124559 -0400 +++ gcc/testsuite/gcc.target/powerpc/prefix-si-constant.c 2020-04-27 13:51:38.400270380 -0400 @@ -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} } } */