From patchwork Tue Jan 22 23:46:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Schmidt X-Patchwork-Id: 1029597 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-494570-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="K2XteSwh"; 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 43klSz3bBhz9s4s for ; Wed, 23 Jan 2019 10:47:13 +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:to:cc :from:subject:date:mime-version:message-id:content-type :content-transfer-encoding; q=dns; s=default; b=TTlKxvBwbDL0bpFV Ne1aY6+b22c5RIRldO0z9p/76xFMQvRSGuqAcOfNbis210glc8QqX2ElxvBWT2wo df9pnml2kD3kB073ehXe2GwbgU10cO5v6Y6sRxLWTUlKM5VuME8urziObyran9cY 3C+fSI4MF6RW3yR6KoGXQOvqsr4= 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:to:cc :from:subject:date:mime-version:message-id:content-type :content-transfer-encoding; s=default; bh=k46/8c3sDWSvkaYADO0UrO Cil8o=; b=K2XteSwhMJk5ZYbcYQA9ZdfrDf0S7fOTGZH30titqMOjf2jA2WESPV nb1KhibiY+Aqdn66Zp6j9DWPh0fb8l2DFyVQpBgFghYt0cQvaT0ib3U/SwRHCeRk Kj/j74+d5/C+6gZhaSqzabNKR+J+2w711eJVLZbdxP4YM8MzrETZc= Received: (qmail 28551 invoked by alias); 22 Jan 2019 23:47:06 -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 27860 invoked by uid 89); 22 Jan 2019 23:47:06 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.1 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, HTML_MESSAGE, KAM_NUMSUBJECT, KAM_SHORT, KHOP_DYNAMIC, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=heart, H*c:alternative X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 22 Jan 2019 23:47:04 +0000 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x0MNiPCj119512 for ; Tue, 22 Jan 2019 18:47:02 -0500 Received: from e11.ny.us.ibm.com (e11.ny.us.ibm.com [129.33.205.201]) by mx0a-001b2d01.pphosted.com with ESMTP id 2q6a2ap1gh-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 22 Jan 2019 18:47:02 -0500 Received: from localhost by e11.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 22 Jan 2019 23:47:02 -0000 Received: from b01cxnp22036.gho.pok.ibm.com (9.57.198.26) by e11.ny.us.ibm.com (146.89.104.198) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 22 Jan 2019 23:47:00 -0000 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x0MNkxdt10354872 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 22 Jan 2019 23:46:59 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 88828B205F; Tue, 22 Jan 2019 23:46:59 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 228E6B2065; Tue, 22 Jan 2019 23:46:59 +0000 (GMT) Received: from BigMac.local (unknown [9.85.133.76]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 22 Jan 2019 23:46:59 +0000 (GMT) To: GCC Patches Cc: Segher Boessenkool , Jakub Jelinek From: Bill Schmidt Subject: [PATCH] rs6000: Fix PR87604 Date: Tue, 22 Jan 2019 17:46:58 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 x-cbid: 19012223-2213-0000-0000-00000341ACDE X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010458; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000275; SDB=6.01150351; UDB=6.00599475; IPR=6.00930683; MB=3.00025245; MTD=3.00000008; XFM=3.00000015; UTC=2019-01-22 23:47:01 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19012223-2214-0000-0000-00005D125F00 Message-Id: <358e8fbe-ae29-86f0-52bd-6b4b64d900ee@linux.ibm.com> A libgomp test demonstrated a problem with reduction code in the Power back end (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87064) for little-endian code. The define_insn_and_split at the heart of the problem depends on big-endian data layout, and should have been disabled when little-endian support was added around 2012. We missed that. The pattern in question was used for V2DF mode; there is a similar pattern for V4SF mode that should also have been disabled. This patch disables both patterns. Thanks to Jakub for analyzing the problem! Bootstrapped and tested on powerpc64le-unknown-linux-gnu with no regressions. The failing testcase now passes. Is this okay for trunk, and eventually for backports to all supported releases? Thanks, Bill 2019-01-22 Jakub Jelinek Bill Schmidt * config/rs6000/vsx.md (*vsx_reduc__v2df_scalar): Disable for little endian. (*vsx_reduc__v4sf_scalar): Likewise. Index: gcc/config/rs6000/vsx.md =================================================================== --- gcc/config/rs6000/vsx.md (revision 268115) +++ gcc/config/rs6000/vsx.md (working copy) @@ -4351,7 +4351,7 @@ (match_dup 1)) (parallel [(const_int 1)]))) (clobber (match_scratch:DF 2 "=0,0,&wd,&wa"))] - "VECTOR_UNIT_VSX_P (V2DFmode)" + "BYTES_BIG_ENDIAN && VECTOR_UNIT_VSX_P (V2DFmode)" "#" "" [(const_int 0)] @@ -4378,7 +4378,7 @@ (clobber (match_scratch:V4SF 2 "=&wf,&wa")) (clobber (match_scratch:V4SF 3 "=&wf,&wa")) (clobber (match_scratch:V4SF 4 "=0,0"))] - "VECTOR_UNIT_VSX_P (V4SFmode)" + "BYTES_BIG_ENDIAN && VECTOR_UNIT_VSX_P (V4SFmode)" "#" "" [(const_int 0)]