From patchwork Fri Nov 15 00:12:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Meissner X-Patchwork-Id: 1195243 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-513519-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="ZQFXidfb"; 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 47Df451PSNz9s4Y for ; Fri, 15 Nov 2019 11:14:43 +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=Kv6mfYfq13g9OiT8nRcHO9R5v7IWtN TT3kMrgPogphOmQ6pcOX7p4YhqIN9zQ/4FFHnQC+KUZpmhRwqb71023nc1roGNvE 9XBzu+ksiYXCAkggT8DJZk66xYnI804V+KnJNEEcOHI7zhxhynhDY5W+jnJFmPJa elmPAaxR4sQqo= 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=bQclbDF/ciZsPMfQZ3eqpEJMH38=; b=ZQFX idfbDL+kxXTYMMut+OeEU0MubxbuJkj+kTjAsFP8u4PbIunuIb6VH7mRWZY1407T APjU4aYvSU48O3czZmJY7jXzguCqgTi6Kzr/6RSpeURf9UPF6nECIql7ekq8+tV/ 5CDV9CsKNcZHINnndGRxE2+MHWXznP7NurDkwZM= Received: (qmail 101025 invoked by alias); 15 Nov 2019 00:14:35 -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 100945 invoked by uid 89); 15 Nov 2019 00:14:31 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.1 spammy=1-3 X-HELO: mx0b-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0b-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 15 Nov 2019 00:14:30 +0000 Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id xAF0E3AC172131; Thu, 14 Nov 2019 19:14:28 -0500 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 2w9gyy0j83-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Nov 2019 19:14:26 -0500 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.27/8.16.0.27) with SMTP id xAF0EJdv172626; Thu, 14 Nov 2019 19:14:19 -0500 Received: from ppma02wdc.us.ibm.com (aa.5b.37a9.ip4.static.sl-reverse.com [169.55.91.170]) by mx0a-001b2d01.pphosted.com with ESMTP id 2w9gyy0hhk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Nov 2019 19:14:17 -0500 Received: from pps.filterd (ppma02wdc.us.ibm.com [127.0.0.1]) by ppma02wdc.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id xAF0AZai009338; Fri, 15 Nov 2019 00:12:57 GMT Received: from b03cxnp08028.gho.boulder.ibm.com (b03cxnp08028.gho.boulder.ibm.com [9.17.130.20]) by ppma02wdc.us.ibm.com with ESMTP id 2w9gy3r4fe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 15 Nov 2019 00:12:57 +0000 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id xAF0CucA25887032 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 15 Nov 2019 00:12:56 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 64191C6057; Fri, 15 Nov 2019 00:12:56 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 01EBEC605B; Fri, 15 Nov 2019 00:12:55 +0000 (GMT) Received: from ibm-toto.the-meissners.org (unknown [9.32.77.177]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTPS; Fri, 15 Nov 2019 00:12:55 +0000 (GMT) Date: Thu, 14 Nov 2019 19:12:54 -0500 From: Michael Meissner To: Michael Meissner , gcc-patches@gcc.gnu.org, Segher Boessenkool , David Edelsohn Subject: [PATCH], V8, #1 of 6, Tessuite: Add PADDI tests Message-ID: <20191115001254.GA19187@ibm-toto.the-meissners.org> Mail-Followup-To: Michael Meissner , gcc-patches@gcc.gnu.org, Segher Boessenkool , David Edelsohn References: <20191115000852.GA18578@ibm-toto.the-meissners.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20191115000852.GA18578@ibm-toto.the-meissners.org> User-Agent: Mutt/1.5.21 (2010-09-15) This patch adds 3 tests that tests whether PLI (PADDI) is generated to load up DImode constants, load up SImode constants, and adding 34-bit constants. Once the appropriate patches to generate this code have been checked in (V7, #1-3), can I check these new tests into the FSF trunk? 2019-11-14 Michael Meissner * gcc.target/powerpc/paddi-1.c: New test to test using PLI to load up a large DImode constant. * gcc.target/powerpc/paddi-2.c: New test to test using PLI to load up a large SImode constant. * gcc.target/powerpc/paddi-3.c: New test to test using PADDI to add a large DImode constant. --- /tmp/s2UNQW_paddi-1.c 2019-11-13 17:39:21.274807246 -0500 +++ gcc/testsuite/gcc.target/powerpc/paddi-1.c 2019-11-13 17:39:21.067805382 -0500 @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target powerpc_prefixed_addr_ok } */ +/* { 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/T53ePo_paddi-2.c 2019-11-13 17:39:21.283807328 -0500 +++ gcc/testsuite/gcc.target/powerpc/paddi-2.c 2019-11-13 17:39:21.069805400 -0500 @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target powerpc_prefixed_addr_ok } */ +/* { 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/gyt7OQ_paddi-3.c 2019-11-13 17:39:21.291807400 -0500 +++ gcc/testsuite/gcc.target/powerpc/paddi-3.c 2019-11-13 17:39:21.071805418 -0500 @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target powerpc_prefixed_addr_ok } */ +/* { 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} } } */