From patchwork Mon Apr 15 20:43:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pat Haugen X-Patchwork-Id: 1085900 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-499276-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="JVScWcKB"; 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 44jgSw330zz9s4Y for ; Tue, 16 Apr 2019 06:43:42 +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:from :subject:to:cc:date:mime-version:content-type :content-transfer-encoding:message-id; q=dns; s=default; b=Z8XCa r0Rxt9bdEoUZ7Q2RzXECSn6Z79pBORYFO/zONNsOx/6ARrVeUqq6XhGlAQQ8e6a5 ikkGJapZmOO4aYohShLVOPeXvGZdt5r6xo5Ddz9QHgJH0QhcVf4p4YnY9Md0nfv3 oxbCRIx8gIHStSJ6MrLDPaOIErmYNesHg9UkUQ= 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:from :subject:to:cc:date:mime-version:content-type :content-transfer-encoding:message-id; s=default; bh=s4eaztDLrQv 9PmQfXkAPHyfVC88=; b=JVScWcKBY0RFlrR6zyND/Xc5VlxSqfjHAOpfHwWBNEw yNZ4/GDdvu422IirrwxqC1mXMMwjbU+1kT6xpcB6ytRfjnm0PFYggV4mNq8UDO3g cvFyXMp6usA7ceKUfKJQrbIY0bB5J30FcrH76v97hxl0qBlH91uoujbKrZUbz3b4 = Received: (qmail 89442 invoked by alias); 15 Apr 2019 20:43: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 89434 invoked by uid 89); 15 Apr 2019 20:43:35 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.1 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, KHOP_DYNAMIC, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.1 spammy=H*u:Intel, H*UA:Intel, H*UA:Macintosh, H*u:Macintosh 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; Mon, 15 Apr 2019 20:43:34 +0000 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x3FKZiOZ059594 for ; Mon, 15 Apr 2019 16:43:32 -0400 Received: from e16.ny.us.ibm.com (e16.ny.us.ibm.com [129.33.205.206]) by mx0b-001b2d01.pphosted.com with ESMTP id 2rw0uk8w5a-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 15 Apr 2019 16:43:31 -0400 Received: from localhost by e16.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 15 Apr 2019 21:43:31 +0100 Received: from b01cxnp23032.gho.pok.ibm.com (9.57.198.27) by e16.ny.us.ibm.com (146.89.104.203) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 15 Apr 2019 21:43:28 +0100 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x3FKhRf68060972 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 15 Apr 2019 20:43:27 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AA1F828065; Mon, 15 Apr 2019 20:43:27 +0000 (GMT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6BA9B2805A; Mon, 15 Apr 2019 20:43:27 +0000 (GMT) Received: from pmac.rchland.ibm.com (unknown [9.10.86.66]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTPS; Mon, 15 Apr 2019 20:43:27 +0000 (GMT) From: Pat Haugen Subject: [PATCH rs6000] Fix PR target/84369: gcc.dg/sms-10.c fails on Power9 To: GCC Patches Cc: Segher Boessenkool , Bill Schmidt Date: Mon, 15 Apr 2019 15:43:26 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 x-cbid: 19041520-0072-0000-0000-0000041A404C X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010933; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000284; SDB=6.01189586; UDB=6.00623293; IPR=6.00970372; MB=3.00026456; MTD=3.00000008; XFM=3.00000015; UTC=2019-04-15 20:43:30 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19041520-0073-0000-0000-00004BD6C82A Message-Id: X-IsSubscribed: yes As pointed out in the PR, the test is failing because a store->load dependency is reporting zero cost. Fixed by leaving existing costs as is (i.e. cost for update forms), and just adding a simple bypass for store->load dependencies. Bootstrap/regtest on powerpc64le (Power9) with no new regressions and testcase now passing. Also ran cpu2006/cpu2017 benchmark comparisons with no notable differences. Ok for trunk? -Pat 2019-04-15 Pat Haugen PR target/84369 * config/rs6000/power9.md: Add store forwarding bypass. Index: gcc/config/rs6000/power9.md =================================================================== --- gcc/config/rs6000/power9.md (revision 270261) +++ gcc/config/rs6000/power9.md (working copy) @@ -236,6 +236,9 @@ (define_insn_reservation "power9-vecstor (eq_attr "cpu" "power9")) "DU_super_power9,LSU_pair_power9") +; Store forwarding latency is 6 +(define_bypass 6 "power9-*store*" "power9-*load*") + (define_insn_reservation "power9-larx" 4 (and (eq_attr "type" "load_l") (eq_attr "cpu" "power9"))