From patchwork Mon Apr 16 19:14:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Meissner X-Patchwork-Id: 898866 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-476439-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="js3xHMwF"; 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 40PykC29N4z9s0b for ; Tue, 17 Apr 2018 05:14:41 +1000 (AEST) 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:mime-version:content-type:message-id; q=dns; s= default; b=kCDr5AH2yksMKT5EmM3iEvvIu9cR/mYxRdnW6KRL9H52AxJSDGzci oSWtr5ldDlcvwrLZrC6tSwawRsbwwKNkE4o7pH/+mqYHZlw8FOAQf16xz5/RFOuw Oe69oJth2XxVlHsGa+8KYgeefpSl2HJ/E2mYbkQvF2ObGZ3QdLnzN8= 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:mime-version:content-type:message-id; s= default; bh=AbVFobwZ7BmftOHSXwQ4K7mFdFw=; b=js3xHMwFGCkwX3BFZm2Z Dpl6slqZZ/E+0HyAf333ykRN/0mTyBLJMSsmUBo+IdmlJwITlOgTmANqeXPSZ7NQ J+DYN1oO/fJ/PGRXiVwEC+soW+P4MESgK86aSI5UiyYpgpUl4YGfrYhwgXKUsEOd hyubWygo7HSRfpqoVh0L7OM= Received: (qmail 80275 invoked by alias); 16 Apr 2018 19:14:34 -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 80256 invoked by uid 89); 16 Apr 2018 19:14:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, KAM_NUMSUBJECT, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy= 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; Mon, 16 Apr 2018 19:14:32 +0000 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3GJDkXu039575 for ; Mon, 16 Apr 2018 15:14:30 -0400 Received: from e35.co.us.ibm.com (e35.co.us.ibm.com [32.97.110.153]) by mx0a-001b2d01.pphosted.com with ESMTP id 2hd0wwaacs-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Mon, 16 Apr 2018 15:14:29 -0400 Received: from localhost by e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 16 Apr 2018 13:14:29 -0600 Received: from b03cxnp07029.gho.boulder.ibm.com (9.17.130.16) by e35.co.us.ibm.com (192.168.1.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 16 Apr 2018 13:14:27 -0600 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w3GJEQ2b10813712; Mon, 16 Apr 2018 12:14:26 -0700 Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C44A1C603C; Mon, 16 Apr 2018 13:14:26 -0600 (MDT) Received: from ibm-tiger.the-meissners.org (unknown [9.32.77.111]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP id A90C4C6037; Mon, 16 Apr 2018 13:14:26 -0600 (MDT) Received: by ibm-tiger.the-meissners.org (Postfix, from userid 500) id 14AA14AAE5; Mon, 16 Apr 2018 15:14:26 -0400 (EDT) Date: Mon, 16 Apr 2018 15:14:25 -0400 From: Michael Meissner To: Michael Meissner , GCC Patches , Segher Boessenkool , David Edelsohn , Bill Schmidt Subject: [PATCH], Fix PR target/85424, PowerPC __builtin_packlongdouble bug discovered in PR target/85075 Mail-Followup-To: Michael Meissner , GCC Patches , Segher Boessenkool , David Edelsohn , Bill Schmidt MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-12-10) X-TM-AS-GCONF: 00 x-cbid: 18041619-0012-0000-0000-0000160D93D9 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008865; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000257; SDB=6.01018862; UDB=6.00519738; IPR=6.00798103; MB=3.00020601; MTD=3.00000008; XFM=3.00000015; UTC=2018-04-16 19:14:28 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18041619-0013-0000-0000-00005250B373 Message-Id: <20180416191425.GA26180@ibm-tiger.the-meissners.org> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-04-16_09:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1804160163 X-IsSubscribed: yes With the code changes in the patch for PR target/85075, I noticed that the PowerPC big-endian build stopped in building big endian, 32-bit libgcc when configured for power8. The issue was this latent bug. Segher asked me to re-submit the bug separately, and I'm doing this for PR target/85424. This is the patch that I did in PR target/85075. For that set, I did bootstrap builds for big endian power7 and little endian power8 (along with a previous build on a big endian power8 system). This patch will need to be back ported to GCC 7. I suspect that it may not be needed in GCC 6, since that revision used RELOAD instead of LRA. But given it is hard to replicate the bug, I will also back port it to GCC 6. Can I apply this to GCC 8, and after a waiting period, apply it to GCC 7 and GCC 6? 2018-04-15 Michael Meissner PR target/85424 * config/rs6000/rs6000.md (pack): Do not try handle a pack where the inputs overlap with the output. Index: gcc/config/rs6000/rs6000.md =================================================================== --- gcc/config/rs6000/rs6000.md (revision 259376) +++ gcc/config/rs6000/rs6000.md (working copy) @@ -13934,16 +13934,14 @@ (define_insn_and_split "unpack_nod (set_attr "length" "4")]) (define_insn_and_split "pack" - [(set (match_operand:FMOVE128 0 "register_operand" "=d,&d") + [(set (match_operand:FMOVE128 0 "register_operand" "=&d") (unspec:FMOVE128 - [(match_operand: 1 "register_operand" "0,d") - (match_operand: 2 "register_operand" "d,d")] + [(match_operand: 1 "register_operand" "d") + (match_operand: 2 "register_operand" "d")] UNSPEC_PACK_128BIT))] "FLOAT128_2REG_P (mode)" - "@ - fmr %L0,%2 - #" - "&& reload_completed && REGNO (operands[0]) != REGNO (operands[1])" + "#" + "&& reload_completed" [(set (match_dup 3) (match_dup 1)) (set (match_dup 4) (match_dup 2))] { @@ -13956,8 +13954,8 @@ (define_insn_and_split "pack" operands[3] = gen_rtx_REG (mode, dest_hi); operands[4] = gen_rtx_REG (mode, dest_lo); } - [(set_attr "type" "fpsimple,fp") - (set_attr "length" "4,8")]) + [(set_attr "type" "fp") + (set_attr "length" "8")]) (define_insn "unpack" [(set (match_operand:DI 0 "register_operand" "=wa,wa")