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 0CFCD3955623 for ; Wed, 16 Nov 2022 07:29:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0CFCD3955623 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 (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AG7I98V025209 for ; Wed, 16 Nov 2022 07:29:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : to : cc : from : subject : content-type : content-transfer-encoding; s=pp1; bh=+Z0oEMdq8t4u7PRjnZy1hE9RGdABvuGRcN7DJBySxec=; b=l9YWFsaWdI6HMBngyQME5VEJnj4bLXaCcvFgjuHVzSEt5kGQboQR1HGPNxFoOSPYZqgl qUQPmb7GxuAd8ayRE5sGeZjCR7DXUtYwUcOxF0y7S8AkebXZ3EUf5CZspp/4FYrM6G38 oe9Rcpa8IxyecqitoCJJD2actvcH5lLwsgTzkzFOnPj4IZKRtSHzc2TR74OWE0+/yux7 tS8rAignFuMoZ0lYVcVU6yA688DsulF765m1lMgvFtdJGIkR3UH1qxWFHn3AZGgArjgv mrg33RjoWU4bNfOYB6NqXF3EraaKNoH5aW1WjQFeNMUfqdJf7J/kjJD8oVULl/sTVny/ bQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3kvubk86xh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 16 Nov 2022 07:29:29 +0000 Received: from m0098421.ppops.net (m0098421.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 2AG7IK5L025507 for ; Wed, 16 Nov 2022 07:29:29 GMT Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3kvubk86x2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Nov 2022 07:29:29 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2AG7Khc4029111; Wed, 16 Nov 2022 07:29:27 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma03ams.nl.ibm.com with ESMTP id 3kt348wgxg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Nov 2022 07:29:27 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2AG7U3Td51904866 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 16 Nov 2022 07:30:03 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BED474C04A; Wed, 16 Nov 2022 07:29:23 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7BBBF4C044; Wed, 16 Nov 2022 07:29:22 +0000 (GMT) Received: from [9.197.233.36] (unknown [9.197.233.36]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 16 Nov 2022 07:29:22 +0000 (GMT) Message-ID: Date: Wed, 16 Nov 2022 15:29:20 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Content-Language: en-US To: GCC Patches Cc: Richard Biener , Robin Dapp From: "Kewen.Lin" Subject: [PATCH] Fix typo in gimple_fold_partial_load_store_mem_ref Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: pJN3GUeC-Cd8nCqfnsI5TgxYAlruESJQ X-Proofpoint-ORIG-GUID: 1ZA36Oj_Xe1MpXXSNoXc6UOJVakOevPs X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-15_08,2022-11-15_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 bulkscore=0 lowpriorityscore=0 mlxlogscore=999 malwarescore=0 suspectscore=0 mlxscore=0 priorityscore=1501 spamscore=0 clxscore=1015 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211160050 X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP 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: Hi, As Robin spotted, my recent commit r13-3716 caused an ICE on s390 if vector access with length is enabled there (his patch for the enablement hasn't been committed yet). The failure is caused by one stupid typo, the bias on s390 is -1, so the assertion should use tree_fits_shwi_p rather than tree_fits_uhwi_p. Thanks for Robin's catching. I just reproduced the ICE and verified the fix worked fine with a cross build, the optimized dump against the test case gcc.target/powerpc/pr107412.c looked expected. Is it ok for trunk? BR, Kewen ----- gcc/ChangeLog: * gimple-fold.cc (gimple_fold_partial_load_store_mem_ref): Use tree_fits_shwi_p rather than tree_fits_uhwi_p as bias is signed. --- gcc/gimple-fold.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/gimple-fold.cc b/gcc/gimple-fold.cc index 0a212e6d0d4..f8a1875ea3e 100644 --- a/gcc/gimple-fold.cc +++ b/gcc/gimple-fold.cc @@ -5392,7 +5392,7 @@ gimple_fold_partial_load_store_mem_ref (gcall *call, tree vectype, bool mask_p) return NULL_TREE; unsigned int nargs = gimple_call_num_args (call); tree bias = gimple_call_arg (call, nargs - 1); - gcc_assert (tree_fits_uhwi_p (bias)); + gcc_assert (tree_fits_shwi_p (bias)); tree biased_len = int_const_binop (MINUS_EXPR, basic_len, bias); unsigned int len = tree_to_uhwi (biased_len); unsigned int vect_len -- 2.25.1