From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by sourceware.org (Postfix) with ESMTPS id 581133858C56 for ; Thu, 13 Oct 2022 11:16:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 581133858C56 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-ed1-x531.google.com with SMTP id m15so2083896edb.13 for ; Thu, 13 Oct 2022 04:16:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=wbZDlUB9hibwHuEtgx2MI1Xl7/l8bg2Ir0ArpGdOwnM=; b=qt5GBFCowkCO0r5lfjCe+d3jBno3cN7ad/WOzECgF0b59CK1KNHmepyosHdNnYDg5C ataEMvgY7Ii4aT2Bl5+q0u/YFl9E+qIA6oZghPm81Yi80m15JdLVKg92tbdKiq5ZBVUY rAMlGCMkLIxgyon/XfAZYibXFx9llQuWKBYl1SbjsYE/y5Ar3/RLLnHm7daKvrtCdsmD W4mYZfsTsCWaZiAcYh6P+KTI4mjeWDDl2YIIZJT29+zW53XUnsWFPBwspQsQnyUaMnLa /hqZJDi6e6C6OYPlUsEE1ifPtHkgDiHxgiTf5I8owuTf3r58nls9tYxu73dmf7djDVMf PQtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wbZDlUB9hibwHuEtgx2MI1Xl7/l8bg2Ir0ArpGdOwnM=; b=ktn9hV2DS59IXP/OjbHIcMat6lvpUfMKX9h98YhZrXBlJGhsiCDwcCArSRaOeMk+od 5fE89h1S54oSWiombXmcXw3guHEHUtfmMDDhfQOOqKUSGpOOiB/LIoPRLZT7JxfxK61Q /yEY3A7ZX8a+oO/BOTSvwKjHYf/OroWaIup62Spe1uOCXhykUNMrE5OCeTHnZWaXrlA8 eScGHht1zr2HXi4gecN9/yVE5BI03TYBiAczRe9ulrpXu5tLAnDL4HNrIAzlDgliWvZ4 2xuVgkBJzWKeKMz6km6qRBBVITsoV9AD6pW2YPI0hu8oGHJs2/EU3sXNqq1dBdVX0cwa LdZw== X-Gm-Message-State: ACrzQf3b7PGE/FmTHSNJ63x0Q5tbjCCbSq6yUg56xIMra8IMpmU8CEKU m+JasvK2yB0cp+lp33/Zuwa9rea/GafryB4QeZF7ca0qcCM= X-Google-Smtp-Source: AMsMyM7X09R5ui2xj3cUY+MdS+TjEu93hAo5E6J3Q5DmYNeVNNFfOY8YcQc/+IEhvagj7ewZjxvqL00x4+0x9/vMTug= X-Received: by 2002:aa7:d415:0:b0:459:4c7:60ce with SMTP id z21-20020aa7d415000000b0045904c760cemr31966473edq.202.1665659761186; Thu, 13 Oct 2022 04:16:01 -0700 (PDT) MIME-Version: 1.0 References: <1908900.PYKUYFuaPT@fomalhaut> In-Reply-To: <1908900.PYKUYFuaPT@fomalhaut> From: Richard Biener Date: Thu, 13 Oct 2022 13:15:49 +0200 Message-ID: Subject: Re: [PATCH] Fix emit_group_store regression on big-endian To: Eric Botcazou Cc: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_SHORT,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: On Wed, Oct 12, 2022 at 1:01 AM Eric Botcazou via Gcc-patches wrote: > > Hi, > > the recent optimization implemented for complex modes in: > https://gcc.gnu.org/pipermail/gcc-patches/2022-May/595865.html > contains an oversight for big-endian platforms in the "interesting corner > case" mentioned in the message: it uses a lowpart SUBREG when the integer > modes have different sizes, but this does not match the semantics of the > PARALLELs which have a bundled byte offset; this offset is always zero in the > code path and the lowpart is not at offset zero on big-endian platforms. > > Calling validate_subreg with this zero offset would fix the regression by > disabling the optimization on big-endian platforms, so instead the attached > fix adds the appropriate right shift for them. > > This fixes the following regressions in the C testsuite on SPARC64/Linux: > FAIL: gcc.c-torture/execute/20041124-1.c -O0 execution test > FAIL: gcc.c-torture/execute/20041124-1.c -O1 execution test > FAIL: gcc.c-torture/execute/20041124-1.c -O2 execution test > FAIL: gcc.c-torture/execute/20041124-1.c -O2 -flto -fno-use-linker-plugin - > flto-partition=none execution test > FAIL: gcc.c-torture/execute/20041124-1.c -O2 -flto -fuse-linker-plugin -fno- > fat-lto-objects execution test > FAIL: gcc.c-torture/execute/20041124-1.c -O3 -g execution test > FAIL: gcc.c-torture/execute/20041124-1.c -Os execution test > FAIL: gcc.dg/compat/struct-by-value-11 c_compat_x_tst.o-c_compat_y_tst.o > execute > FAIL: gcc.dg/compat/struct-by-value-12 c_compat_x_tst.o-c_compat_y_tst.o > execute > FAIL: tmpdir-gcc.dg-struct-layout-1/t027 c_compat_x_tst.o-c_compat_y_tst.o > execute > > Tested on SPARC64/Linux, OK for the mainline? OK. Thanks, Richard. > > 2022-10-11 Eric Botcazou > > * expr.cc (emit_group_stote): Fix handling of modes of different > sizes for big-endian targets in latest change and add commentary. > > -- > Eric Botcazou