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 151903858017 for ; Tue, 27 Sep 2022 13:19:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 151903858017 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 (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28RC7re2010837 for ; Tue, 27 Sep 2022 13:19:28 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=Hz0RGpaBToXGJ5AsVw75M4in85evJrskie4Vtn2I+4Y=; b=ImWjTCh1VUbvszrEUSO1+cVjlCBW2AZ5GSFnEblURcdZR8Ew+5hH4gbHN+cpWxkP0MVT Yrw6W6kzGVerVevDterGlwnPRXa/xWVJNrVJPrfLUs4gDo+wtpG36tiGcEAbn1MaGDrN wLNx3nvxC8mrDV23BABl7YcbLDLFqgIFYc6bevSJC/A6WU3LLf4dUGyIDJcWtmVcEZtw yvnvNtQiv56ZWHcEOam4aYObpWQR2dGK4R7ODD2bMhctpyEHE/niq7w35PmH8RpMZTIz hBAd16poLwR67AF8PmEZyq/rSWJ+8BRT/e8gsw+cI+J6cUpe3Z077w+IpAe6t5VAVrZv 1Q== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3juxwtnu53-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 27 Sep 2022 13:19:28 +0000 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 28R9qTKL010980 for ; Tue, 27 Sep 2022 13:19:28 GMT Received: from ppma06fra.de.ibm.com (48.49.7a9f.ip4.static.sl-reverse.com [159.122.73.72]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3juxwtnu44-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 27 Sep 2022 13:19:27 +0000 Received: from pps.filterd (ppma06fra.de.ibm.com [127.0.0.1]) by ppma06fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 28RD6QE4013997; Tue, 27 Sep 2022 13:19:26 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma06fra.de.ibm.com with ESMTP id 3jss5htwcq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 27 Sep 2022 13:19:26 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 28RDJNTc64749952 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 27 Sep 2022 13:19:23 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BD0395204F; Tue, 27 Sep 2022 13:19:23 +0000 (GMT) Received: from [9.171.15.101] (unknown [9.171.15.101]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id 8FC105204E; Tue, 27 Sep 2022 13:19:23 +0000 (GMT) Message-ID: Date: Tue, 27 Sep 2022 15:19:23 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: VN, len_store and endianness Content-Language: en-US To: Richard Biener Cc: GCC Patches , jakub@redhat.com References: <0a9b9375-6587-5a7d-2ec9-18e7501fe179@linux.ibm.com> From: Robin Dapp In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: XGGxlRe_OA7gT_B-knLVaz_fbk5sL3Wk X-Proofpoint-GUID: 9Phiz7JJhr-isBIBXNMfOVzaOkXfrJPm X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-27_03,2022-09-27_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 suspectscore=0 mlxlogscore=641 priorityscore=1501 adultscore=0 phishscore=0 impostorscore=0 bulkscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2209270080 X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,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: > The error is probably in vn_reference_lookup_3 which assumes that > 'len' applies to the vector elements in element order. See the part > of the code where it checks for internal_store_fn_p. If 'len' is with > respect to the memory and thus endianess has to be taken into > account then for the IFN_LEN_STORE > > else if (fn == IFN_LEN_STORE) > { > pd.rhs_off = 0; > pd.offset = offset2i; > pd.size = (tree_to_uhwi (len) > + -tree_to_shwi (bias)) * BITS_PER_UNIT; > if (ranges_known_overlap_p (offset, maxsize, > pd.offset, pd.size)) > return data->push_partial_def (pd, set, set, > offseti, maxsizei); > > likely needs to adjust rhs_off from zero for big endian? Not sure I follow entirely. rhs_off only seems to be used for native_encode_expr which properly encodes already ({-1, 1, -1, 1} in that order in memory). A 'len' of 12 is the first three elements (in the same order or element order as well). If the constant were encoded in little endian ({1, -1, 1, -1}) 'q' would kind of address the right elements (using always the second, or "reversed third" element while shifting the buffer by 4 bytes each time).