From patchwork Tue Jun 5 01:57:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Bergner X-Patchwork-Id: 925280 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-479072-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=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="ZSniui7+"; 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 410FLg0tsTz9rxs for ; Tue, 5 Jun 2018 11:57:45 +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:to:cc :from:subject:date:mime-version:content-type :content-transfer-encoding:message-id; q=dns; s=default; b=L8uhX QS4SsZEb+6FTSBAUDa+nLOJ6XIUcPz5FuagE6Xb1pGbjLpLfrtLwX9PTqDdEhUIV ru0iKnpUH3Yg04qeJ6hJ1FbaVK1KDKujKFVzHLkiQb0SRdr1wd2FycGnAOw7VNb/ ct4JCvTNN4ZhWTRNrBf5d1T/sLDjiTPN7oWwBw= 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:content-type :content-transfer-encoding:message-id; s=default; bh=yalJE4mSKkc z74YxrqfPWktRqSw=; b=ZSniui7+R2ie+Ppmdn0t8oX9jtOH0eLVR/CMiQn4dYZ k/ciVNjhTCVmgnDDYIgqnZ8GqZuOEf8EWJ6RVIZ/Q4ed7Ra7EFPee8Kt8eXR6gpC HC11pnt1UDo6ov2fEw97hAfShVmOkgj3Qr/lJDzNIJE3D4Dt7yK8OsXxQjBqVlb0 = Received: (qmail 113423 invoked by alias); 5 Jun 2018 01:57:37 -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 109422 invoked by uid 89); 5 Jun 2018 01:57:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-12.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS 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; Tue, 05 Jun 2018 01:57:32 +0000 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w551rtCS045439 for ; Mon, 4 Jun 2018 21:57:30 -0400 Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.150]) by mx0a-001b2d01.pphosted.com with ESMTP id 2jddw5pfex-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 04 Jun 2018 21:57:30 -0400 Received: from localhost by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 4 Jun 2018 19:57:29 -0600 Received: from b03cxnp07028.gho.boulder.ibm.com (9.17.130.15) by e32.co.us.ibm.com (192.168.1.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 4 Jun 2018 19:57:27 -0600 Received: from b03ledav003.gho.boulder.ibm.com (b03ledav003.gho.boulder.ibm.com [9.17.130.234]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w551vQ765308834 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 4 Jun 2018 18:57:26 -0700 Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 852826A04D; Mon, 4 Jun 2018 19:57:26 -0600 (MDT) Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BB0C06A047; Mon, 4 Jun 2018 19:57:25 -0600 (MDT) Received: from otta.local (unknown [9.80.239.248]) by b03ledav003.gho.boulder.ibm.com (Postfix) with ESMTP; Mon, 4 Jun 2018 19:57:25 -0600 (MDT) To: GCC Patches Cc: Segher Boessenkool , "Carl E. Love" , Bill Schmidt From: Peter Bergner Subject: [PATCH, rs6000] Fix PR target/63177: Powerpc no-vfa-vect-depend-2.c and no-vfa-vect-depend-3.c failures Date: Mon, 4 Jun 2018 20:57:24 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 18060501-0004-0000-0000-0000143EF193 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009131; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000265; SDB=6.01042440; UDB=6.00533791; IPR=6.00821570; MB=3.00021466; MTD=3.00000008; XFM=3.00000015; UTC=2018-06-05 01:57:28 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18060501-0005-0000-0000-00008790FD2E Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-06-04_16:, , signatures=0 X-IsSubscribed: yes PR63177 shows a bug in how we determine which gas options we decide to pass to the assembler. Normally, we pass the -m option to the assembler if we used the -mcpu= option. However, if we don't compile with -mcpu=, then we will check some of the -m options and pass an appropriate -m option to the assembler. This is all fine and good except for when we compile with -mpower9-vector -mcpu=power8. The problem here is that POWER9 added new lxvx/stxvx instructions which already existed in POWER8 as extended mnemonics of lxvd2x/stxvd2x which are different instructions and behave differently in LE mode. The "bug" is that -mpower9-vector enables the generation of the POWER9 lxvx instruction, but the -mcpu=power8 option causes us to use the -mpower8 assembler option so we get the wrong instruction. :-( The fix used here is to catch the special case when we use -mpower9-vector and -mcpu=power8 together and then force ourselves to use the -mpower9 gas option. This passed bootstrap and regtesting with no regressions and fixes a little over 150 testsuite failures. Ok for trunk and the appropriate release branches once it's baked on trunk for a while? Peter PR target/63177 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9. Don't handle -mcpu=power8 if -mpower9-vector is also used. Index: gcc/config/rs6000/rs6000.h =================================================================== --- gcc/config/rs6000/rs6000.h (revision 260913) +++ gcc/config/rs6000/rs6000.h (working copy) @@ -120,7 +120,7 @@ %{mcpu=power6: %(asm_cpu_power6) -maltivec} \ %{mcpu=power6x: %(asm_cpu_power6) -maltivec} \ %{mcpu=power7: %(asm_cpu_power7)} \ -%{mcpu=power8: %(asm_cpu_power8)} \ +%{mcpu=power8: %{!mpower9-vector: %(asm_cpu_power8)}} \ %{mcpu=power9: %(asm_cpu_power9)} \ %{mcpu=a2: -ma2} \ %{mcpu=powerpc: -mppc} \ @@ -169,6 +169,7 @@ %{maltivec: -maltivec} \ %{mvsx: -mvsx %{!maltivec: -maltivec} %{!mcpu*: %(asm_cpu_power7)}} \ %{mpower8-vector|mcrypto|mdirect-move|mhtm: %{!mcpu*: %(asm_cpu_power8)}} \ +%{mpower9-vector: %{!mcpu*|mcpu=power8: %(asm_cpu_power9)}} \ -many" #define CPP_DEFAULT_SPEC ""