From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 82ED23858D39 for ; Wed, 29 Dec 2021 09:36:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 82ED23858D39 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1BT9CYAq026181; Wed, 29 Dec 2021 09:36:36 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 3d8ct20tyy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 29 Dec 2021 09:36:35 +0000 Received: from m0098420.ppops.net (m0098420.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 1BT9PAB8011215; Wed, 29 Dec 2021 09:36:35 GMT Received: from ppma01fra.de.ibm.com (46.49.7a9f.ip4.static.sl-reverse.com [159.122.73.70]) by mx0b-001b2d01.pphosted.com with ESMTP id 3d8ct20tyf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 29 Dec 2021 09:36:35 +0000 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 1BT9W8k7006841; Wed, 29 Dec 2021 09:36:33 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma01fra.de.ibm.com with ESMTP id 3d5tx9c9rk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 29 Dec 2021 09:36:33 +0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 1BT9RxTd47120640 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 29 Dec 2021 09:27:59 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 43F6A11C05B; Wed, 29 Dec 2021 09:36:30 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9D2AF11C058; Wed, 29 Dec 2021 09:36:28 +0000 (GMT) Received: from KewenLins-MacBook-Pro.local (unknown [9.200.147.170]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 29 Dec 2021 09:36:28 +0000 (GMT) From: "Kewen.Lin" Subject: [PATCH] rs6000: Don't turn off VSX for P9 VECTOR when TARGET_AVOID_XFORM set To: GCC Patches Cc: Segher Boessenkool , David Edelsohn , Bill Schmidt , Michael Meissner Message-ID: <8552a3a2-60ff-dd2d-1053-e2a4d5e72af3@linux.ibm.com> Date: Wed, 29 Dec 2021 17:36:27 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 Content-Type: text/plain; charset=gbk Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: P_jR7yJ9rAJiOJndhotqJayXq7tXJP8i X-Proofpoint-ORIG-GUID: stqxFq3U9at4gx989-SQHVR1cWaqm8s8 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2021-12-29_03,2021-12-28_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 bulkscore=0 phishscore=0 malwarescore=0 adultscore=0 mlxlogscore=999 spamscore=0 priorityscore=1501 lowpriorityscore=0 suspectscore=0 impostorscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112290051 X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Dec 2021 09:36:38 -0000 Hi, When TARGET_AVOID_XFORM is set, we turn off VSX. But at least from ISA3.0 (Power9), we support DQ form vector load/store. This patch is to make it not clear VSX when P9 VECTOR supported, it also checks some flags which P9 VECTOR relies on, otherwise those flags could disable P9 VECTOR later. Bootstrapped and regtested on powerpc64le-linux-gnu P9 and powerpc64-linux-gnu P8. Is it ok for trunk? BR, Kewen ----- gcc/ChangeLog: * config/rs6000/rs6000.c (rs6000_option_override_internal): Consider P9 VECTOR when determining to disable VSX for TARGET_AVOID_XFORM. --- gcc/config/rs6000/rs6000.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 66b01e589b0..c020947abc8 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -3865,7 +3865,10 @@ rs6000_option_override_internal (bool global_init_p) rs6000_isa_flags_explicit |= OPTION_MASK_VSX; } } - else if (TARGET_AVOID_XFORM > 0) + else if (TARGET_AVOID_XFORM > 0 + /* Exclude P9 VECTOR which supports DQ form, but need to check + some flags which are able to disable it as well. */ + && !(TARGET_ALTIVEC && TARGET_P8_VECTOR && TARGET_P9_VECTOR)) msg = N_("%<-mvsx%> needs indexed addressing"); else if (!TARGET_ALTIVEC && (rs6000_isa_flags_explicit & OPTION_MASK_ALTIVEC)) -- 2.27.0