From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id 4765D3851519 for ; Thu, 27 Oct 2022 13:12:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4765D3851519 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.95,217,1661846400"; d="scan'208";a="85524423" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 27 Oct 2022 05:12:58 -0800 IronPort-SDR: vTw7wPKfX/wsj0h6pHLmHUakaDqkCMc9Zf6uFs2z94BOes40yizntvjB4ZWuMdjR1c9s9JxNVt hJMvlW2r0BJeJkxySOPhoCmsuPjugK+GpN1ov55sqDRA+HaKY8zEU7DJjOjfAKXqnLZaEcD2e8 eyLcQuJRaSv/2JT78HtRJrw7KDsLGrFTzoLO6ZwmQrKMdalefO62dwFC/+Y7IvElPCQAmaaDgf vDdLZndoelIvOB+A4HNXd9pOLaezQnl2ir1VvW4ar/VoT2YRNiQb+2J1S1UCAvNRUFGQBKFyIU VME= Message-ID: <811f04f9-be1a-f1f9-bbab-49553b2b40b1@codesourcery.com> Date: Thu, 27 Oct 2022 14:12:52 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.3 Subject: Re: [OG12 commit] vect: WORKAROUND vectorizer bug Content-Language: en-GB To: Richard Biener CC: References: <264e9c27-cef4-b2a5-8758-a8b621428e01@codesourcery.com> From: Andrew Stubbs In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) To svr-ies-mbx-11.mgc.mentorg.com (139.181.222.11) X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no 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 24/10/2022 19:06, Richard Biener wrote: > > >> Am 24.10.2022 um 18:51 schrieb Andrew Stubbs : >> >> I've committed this to the OG12 branch to remove some test failures. We probably ought to have something on mainline also, but a proper fix would be better. >> >> Without this. the libgomp.oacc-c-c++-common/private-variables.c testcase fails to compile due to an ICE. The OpenACC worker broadcasting code is creating SLP optimizable loads and stores in amdgcn address-space-4. Previously this was "ok" as SLP didn't work with less that 64-lane vectors, but the newly implemented smaller vectors are working as intended and optimizing this. >> >> Unfortunately the vectorizer is losing the address-space data from the intermediate types, and it all falls apart during expand when it tries the convert a 32-bit address into a 64-bit address and that's not something that works. At first sight it looks like we could possibly make that work with POINTERS_EXTEND_UNSIGNED, but that only changes the error message. Fundamentally we need to make sure that various instances of "vectype" have the correct address space, but my attempts to do so showed that that's a larger task than I have time for right now. > > Istr there were issues like this in the past that I fixed, so any testcase that exposes this with just a gcn cc1 would be nice to have. I've been unable to reproduce this issue on the mainline compiler. The SLP vectorizer says the accesses are not consecutive, although I don't know why they would be different. A simple testcase works fine on OG12 as well. It's something weird to do with the OpenACC worker broadcasting code that I can't reproduce manually. Thank you for the offer. I'll let you know if I get a testcase. Andrew