From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by sourceware.org (Postfix) with ESMTPS id 586E5385840C for ; Mon, 24 Oct 2022 18:06:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 586E5385840C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-x636.google.com with SMTP id n12so1532552eja.11 for ; Mon, 24 Oct 2022 11:06:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:from:to:cc:subject:date:message-id :reply-to; bh=gqsJt9sPOBw13vcPXn1sI/pRlstbnCxykk1n971lMbM=; b=Z5y/pXgpydriBvJgMELc5fI9VGocxJjRW0QuZOSCl0vvlGfl5DjnhMzpRFEaptQSw1 3I/XVRM4zGhIE/WwoEX47jv0ZOAoRUuB2n5ihuAcyzkrCjpt9nhvMI4PXHM/EROfANQ7 BkwhVzJIwNs08byVoKlbbaxM3od5u8LdtUL5nHcTUgTxA6F2zHrHNJ8t6BnFpFnVzlzl f1g2d09XzLEd7SlYOxycvMP/hBscWdh/12VM+G7hYSysZgh/Qh+ZQYpSsCIqbY7qWlWa SOB/+wUBlADDhKHScsjY0G0EG9TMOXNuzpmw2Tngp3P1r9d94idKsRITd315CVpnCbD4 enyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gqsJt9sPOBw13vcPXn1sI/pRlstbnCxykk1n971lMbM=; b=oEs1q3Kf1zkhYONDDfJo7j9yNKjEvm1K/7qIKIfY7KQWrbQ64HkxqyAKMAElu2HpMy X/RojW67Zod5peDstYGr34WQm2kirfBLe0z55LykwHaEzbc9QTfOIql7+7BYbc+aU1Oi ePmSEj+dH0nD616kXqxKY99y/0JGZhHjmQcdnZNfUeXApdWc6snpu05EDgA0/gVD/AQK wDcnt3RiDJy7tMX1jq/DEyiW+egoXoO7tZkXMI9ncS7oahWBxW03v6eeVI6v/RvbVeuz /leCbRGq0xpfAGLC0YmO0USUFrYk4ru9vdSDiVgNWA+UbZG45/To5JqHdH9PYJvYVPaz Z2Bw== X-Gm-Message-State: ACrzQf0v7HpDviweQCmp1NfqkJqIm6du1l1Uey5N5dUCAjE15cg3iLd7 hIg0fC7zvm9HzPEqFynCFFWQyOgj/rTmiA== X-Google-Smtp-Source: AMsMyM4WGmD4uZsWOGp2FHbRigpYrw0Wlrj1BWPGFI640DGtB8wgHglubueMadkQTbrS8C9QCJT7qA== X-Received: by 2002:a17:906:8a66:b0:78b:da52:b752 with SMTP id hy6-20020a1709068a6600b0078bda52b752mr28051042ejc.365.1666634775152; Mon, 24 Oct 2022 11:06:15 -0700 (PDT) Received: from smtpclient.apple (dynamic-095-118-067-005.95.118.pool.telefonica.de. [95.118.67.5]) by smtp.gmail.com with ESMTPSA id cm1-20020a0564020c8100b004585eba4baesm228336edb.80.2022.10.24.11.06.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 Oct 2022 11:06:14 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Richard Biener Mime-Version: 1.0 (1.0) Subject: Re: [OG12 commit] vect: WORKAROUND vectorizer bug Date: Mon, 24 Oct 2022 20:06:13 +0200 Message-Id: References: <264e9c27-cef4-b2a5-8758-a8b621428e01@codesourcery.com> Cc: gcc-patches@gcc.gnu.org In-Reply-To: <264e9c27-cef4-b2a5-8758-a8b621428e01@codesourcery.com> To: Andrew Stubbs X-Mailer: iPhone Mail (19H12) X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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: > Am 24.10.2022 um 18:51 schrieb Andrew Stubbs : >=20 > =EF=BB=BFI've committed this to the OG12 branch to remove some test failur= es. We probably ought to have something on mainline also, but a proper fix w= ould be better. >=20 > Without this. the libgomp.oacc-c-c++-common/private-variables.c testcase f= ails to compile due to an ICE. The OpenACC worker broadcasting code is crea= ting SLP optimizable loads and stores in amdgcn address-space-4. Previously t= his was "ok" as SLP didn't work with less that 64-lane vectors, but the newl= y implemented smaller vectors are working as intended and optimizing this. >=20 > Unfortunately the vectorizer is losing the address-space data from the int= ermediate types, and it all falls apart during expand when it tries the conv= ert a 32-bit address into a 64-bit address and that's not something that wor= ks. At first sight it looks like we could possibly make that work with POINT= ERS_EXTEND_UNSIGNED, but that only changes the error message. Fundamentally w= e need to make sure that various instances of "vectype" have the correct add= ress 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 t= hat exposes this with just a gcn cc1 would be nice to have. Richard=20 >=20 > This patch simply prevents the vectorizer working in the case where it wou= ld break. This should not be a regression because this code didn't vectorize= at all, previously. >=20 > Andrew > <221024-workarround-vec-addrspace-bug.patch>