From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 6549F3858426 for ; Thu, 6 Jul 2023 19:48:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6549F3858426 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0353725.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 366JkTEt016162; Thu, 6 Jul 2023 19:48:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=bVVW9YeWYXI+7yb1vYUgufNe60+x/zMXy259n6b+YMU=; b=tPdmS65bcJ4GB06NAjc0wBaSXBN+x3jGQjOIkchejbotuyC+7MPJiUDNhoY5LWZ529Y1 cZI/xmF9J4pV41lCHq/GKkGOUT2qt6Y9xRPGeC2w+z42ShptiEUJ97uZt53gqsMBSW0s SJDRwfejMjcea4OnKofoHTx4oYVwBKphH8AAWjvb4eLQSw94hxRuDqAQTQk0DaZarX8t Tr7zDxZs+NpPRZzY0Tpnx+Ox5iPVoHJmh1bcfdaNCKU/lPFv449+rxuar6c76176W6Dy T/CycNRFHBhBA2oY7ZtltEbPiQHzvIc/iJd/XFIWAPEM8qkFIBlIKE4Nkps82zkRtD9j Qw== Received: from ppma03wdc.us.ibm.com (ba.79.3fa9.ip4.static.sl-reverse.com [169.63.121.186]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rp42j80m6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 06 Jul 2023 19:48:23 +0000 Received: from pps.filterd (ppma03wdc.us.ibm.com [127.0.0.1]) by ppma03wdc.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 366Gdwdd017203; Thu, 6 Jul 2023 19:48:22 GMT Received: from smtprelay03.wdc07v.mail.ibm.com ([9.208.129.113]) by ppma03wdc.us.ibm.com (PPS) with ESMTPS id 3rjbs626rk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 06 Jul 2023 19:48:22 +0000 Received: from smtpav06.dal12v.mail.ibm.com (smtpav06.dal12v.mail.ibm.com [10.241.53.105]) by smtprelay03.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 366JmK4c1901300 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 6 Jul 2023 19:48:21 GMT Received: from smtpav06.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D110658061; Thu, 6 Jul 2023 19:48:20 +0000 (GMT) Received: from smtpav06.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 546C55805E; Thu, 6 Jul 2023 19:48:20 +0000 (GMT) Received: from [9.61.25.68] (unknown [9.61.25.68]) by smtpav06.dal12v.mail.ibm.com (Postfix) with ESMTP; Thu, 6 Jul 2023 19:48:20 +0000 (GMT) Message-ID: <4df964d2-2a5e-5aae-0562-fce56ee4a9b8@linux.ibm.com> Date: Thu, 6 Jul 2023 14:48:19 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH] rs6000: Don't ICE when generating vector pair load/store insns [PR110411] Content-Language: en-US To: Segher Boessenkool , P Jeevitha Cc: gcc-patches@gcc.gnu.org, linkw@linux.ibm.com References: <56b3d9a9-fd0b-3760-3a62-25dcddd4dc85@linux.vnet.ibm.com> <20230706173314.GR19790@gate.crashing.org> From: Peter Bergner In-Reply-To: <20230706173314.GR19790@gate.crashing.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: AI-TVkiUpMXIomfkDtzV3TzP25Tf5zIU X-Proofpoint-ORIG-GUID: AI-TVkiUpMXIomfkDtzV3TzP25Tf5zIU X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-06_14,2023-07-06_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 malwarescore=0 spamscore=0 bulkscore=0 suspectscore=0 impostorscore=0 phishscore=0 mlxlogscore=962 priorityscore=1501 adultscore=0 lowpriorityscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2307060174 X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,KAM_SHORT,NICE_REPLY_A,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 7/6/23 12:33 PM, Segher Boessenkool wrote: > On Wed, Jul 05, 2023 at 05:21:18PM +0530, P Jeevitha wrote: >> --- a/gcc/config/rs6000/rs6000.cc >> +++ b/gcc/config/rs6000/rs6000.cc >> @@ -9894,6 +9894,8 @@ rs6000_legitimate_address_p (machine_mode mode, rtx x, bool reg_ok_strict) >> >> /* Handle unaligned altivec lvx/stvx type addresses. */ >> if (VECTOR_MEM_ALTIVEC_OR_VSX_P (mode) >> + && mode != OOmode >> + && mode != XOmode >> && GET_CODE (x) == AND >> && CONST_INT_P (XEXP (x, 1)) >> && INTVAL (XEXP (x, 1)) == -16) > > Why do we need this for OOmode and XOmode here, but not for the other > modes that are equally not allowed? That makes no sense. VECTOR_MEM_ALTIVEC_OR_VSX_P (mode) already filters those modes out (eg, SImode, DFmode, etc.), just not OOmode and XOmode, since those both are modes used in/with VSX registers. > Should you check for anything that is more than a register, for example? > If so, do *that*? Well rs6000_legitimate_address_p() is only passed the MEM rtx, so we have no idea if this is a load or store, so we're clueless on number of regs needed to hold this mode. The best we could do is something like GET_MODE_SIZE (mode) == GET_MODE_SIZE (V16QImode) or some such thing. Would you prefer something like that? >> --- /dev/null >> +++ b/gcc/testsuite/gcc.target/powerpc/pr110411.c >> @@ -0,0 +1,21 @@ >> +/* PR target/110411 */ >> +/* { dg-options "-O2 -mdejagnu-cpu=power10 -S -mblock-ops-vector-pair" } */ > > -S in testcases is wrong. Why do you want this? It is *good* if this > is hauled through the assembler as well! If you *really* want this you > use "dg-do assemble", but you shouldn't. For test cases checking for ICEs, we don't need to assemble, so I agree, we just need to remove the -S option, which is implied by this being a dg-do compile test case (the default for this test directory). Peter