From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 609243858437 for ; Mon, 26 Sep 2022 14:21:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 609243858437 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 (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28QEAuib007527 for ; Mon, 26 Sep 2022 14:21:15 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : to : from : subject : content-type : content-transfer-encoding; s=pp1; bh=g4ORjh3ELGjTHrSLsYa2hIZv4L3xjKIWuZpVUlgcgqs=; b=bkn6X6RmY9k2Ri4FZXiiWKUNsfcD06B2Pkg4qrjaY47VQ0BSJwXyUszxsrWD+8lsIz3W l0mXRWb85o5IWgsThIQgNlV4s3nWw9A36f1d4GarsuhmcoOZcV+ndLHHJ3zA3/qVsM/X GRAjdTYH4sClZf07pJRnBx97sEM73+EF5CvDP4UVy9TacneiS7h6+bNiqIVZNRt3dgQ5 62n4qbU91h1PLqpMUH2GEQ3n/KTLEkju6DqbCZ4fJgsgj/Q8JWkjJJuDIvGMNSo0x2BR 0UlwDq+C2gFXOnyGpx+oB/EtBP+XaWob9AqYC0Avj0kwAkYypjCJ2wjy8pICEb3fnpTS Lw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3juc12bawx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 26 Sep 2022 14:21:14 +0000 Received: from m0098410.ppops.net (m0098410.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 28QEDYSH020067 for ; Mon, 26 Sep 2022 14:21:14 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 3juc12baw2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 26 Sep 2022 14:21:14 +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 28QE5ZAM012562; Mon, 26 Sep 2022 14:21:12 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma03ams.nl.ibm.com with ESMTP id 3jssh9aj9a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 26 Sep 2022 14:21:11 +0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 28QEL9Y450659708 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 26 Sep 2022 14:21:09 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 83278A405C; Mon, 26 Sep 2022 14:21:09 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 511A5A405B; Mon, 26 Sep 2022 14:21:09 +0000 (GMT) Received: from [9.171.25.110] (unknown [9.171.25.110]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Mon, 26 Sep 2022 14:21:09 +0000 (GMT) Message-ID: <0a9b9375-6587-5a7d-2ec9-18e7501fe179@linux.ibm.com> Date: Mon, 26 Sep 2022 16:21:08 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Content-Language: en-US To: GCC Patches , Richard Biener , jakub@redhat.com From: Robin Dapp Subject: VN, len_store and endianness Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: _rvngF369jcSWNP1oyj45aQRyV0DSpYP X-Proofpoint-GUID: ReJ09xfzNt_I_WnGf_1bLyDnNXmqjfDy 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-26_08,2022-09-22_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 clxscore=1015 priorityscore=1501 bulkscore=0 mlxlogscore=999 malwarescore=0 phishscore=0 spamscore=0 suspectscore=0 mlxscore=0 impostorscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2209260089 X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,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, I'm locally testing a branch that enables vll/vstl for partial vector usage i.e. len_load and len_store on s390. I see a FAIL in testsuite/gfortran.dg/power_3.f90. Since r13-1777-gbd9837bc3ca134 we also performe VN for masked/len stores and things go wrong there. The problem seems to be that we evaluate a vector constant {-1, 1, -1, 1} loaded with length 11 + 1(bias) = 12 as {1, -1, 1} instead of {-1, 1, -1}. I found it a bit difficult to navigate through the logic due to several sizes, offsets, lengths and "amounts" :) From what I can tell the culprit code is (guarded by BYTES_BIG_ENDIAN) if (TREE_CODE (pd.rhs) != CONSTRUCTOR) { q = (this_buffer + len - (ROUND_UP (size - amnt, BITS_PER_UNIT) / BITS_PER_UNIT)); } where, with pd.rhs = { 255, 255, 255, 255, 0, 0, 0, 1, 255, 255, 255, 255, 0, 0, 0, 1 }, len = 16 bytes, size = 96 bits, we read after the first 32 bits. What is supposed to happen here? It looks like going backwards (when size grows), but actually size shrinks for my example with each successive element via pd.offset 0, -32 and -64. When skipping the block with && TREE_CODE (pd.rhs) != VECTOR_CST the test and various others succeed but I didn't pursue testing further and figured I'd rather ask here for more insight. Regards Robin