From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by sourceware.org (Postfix) with ESMTPS id 9C0073858D28 for ; Thu, 22 Jun 2023 07:58:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9C0073858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=vrull.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=vrull.eu Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-3f9c0abc8b1so15845235e9.1 for ; Thu, 22 Jun 2023 00:58:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull.eu; s=google; t=1687420733; x=1690012733; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=gNGso2IqcovxE2LFYJVQtgA8v31+0rjqVvYjgZUMnYY=; b=Hj/opOIv8K5xlTggm5O6P0fVUtcdIiHwAWbt1Aiysfa2fR445DgHKcBHgtyeKJXBbY 67Yc6c72SCAJGAwsI9DisZ+oEHcWBX82uqmzmfKj4s/sRu70k13PJg15VbXWi0AZDWcd xKTYrhFI/e8FSS0TKa8nU0hXS8RUUuCo4ROvnbmQSQml0J6sZNaSpLZZSKI7GhBbDzDF 24dpoPYwsSzwyxdaphK8om45GeGkRtQ9wB6y90qEaB/j69ULa5Y0JDt5uykza8QGiTjX CV70wADlwKbqm5A61CXgADuAuSW28tlgdVF3bjpcIirzfCUqTzDp9uUVRUgxTLzCkMOs O3yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687420733; x=1690012733; h=content-transfer-encoding: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=gNGso2IqcovxE2LFYJVQtgA8v31+0rjqVvYjgZUMnYY=; b=QuBUa8InsMsNrGzTrFZ5F1BVYx7vEiOQ7g64zzcnejbG9/q6YUOlvmMnklzc6MOIHW r5gU1N7etK5y00Jw/pNZiM6BbSU+yPT0kgzeDQrE02EwJdpY2QxoHycNFJQndHRTmtlJ 8bju1JWYswJsd3eQIvyvH3pWZdBU4yB+p3V4um9+3crP6tchZptQzXT+Fd1LJCngbvWz 90HdPv1QDVtzLkMl3IRoL6W3hLjz7AhWhdVc9LZUGD5Zn4u1ksY3hzdKr5hl7Qv1KZiZ vm2Nw7D40oMV/vluebN8oriNC1CdYpdA4H2FFa4yXaXkhIis9M+WHb3SCl/17zY3tmOm nPyQ== X-Gm-Message-State: AC+VfDzyv90W14595uJ5T3lUrMRfbWA6AUi9XyJtyfV1TE8/WsHMYAVc 2HN3+FxyDFjliMErfLmDU9I4pOz9wgygoIiUgvoVAg== X-Google-Smtp-Source: ACHHUZ4OvAxXVpkeRJzSMSzQjukdUFuW6QWsLlfCMbwqzv1iOnrSpbM1p85IAVxPZK+W5gxDhYgdAdNXfbJGhtnlkyU= X-Received: by 2002:a1c:f70f:0:b0:3f7:2a1d:1b05 with SMTP id v15-20020a1cf70f000000b003f72a1d1b05mr16788976wmh.14.1687420732997; Thu, 22 Jun 2023 00:58:52 -0700 (PDT) MIME-Version: 1.0 References: <20230525123550.1072506-1-manolis.tsamis@vrull.eu> <20230525123550.1072506-3-manolis.tsamis@vrull.eu> <5836d561-2986-484c-8d9a-744c948e8602@gmail.com> <87ttv3xud1.fsf@linaro.org> <3bdd7695-ad88-d8d9-5133-05cb95623949@gmail.com> <1a3e4d1e-59ee-c3ef-fd0b-d4d9265dc12d@gmail.com> <871qi4idr7.fsf@linaro.org> In-Reply-To: From: Philipp Tomsich Date: Thu, 22 Jun 2023 09:58:41 +0200 Message-ID: Subject: Re: [PATCH 2/2] cprop_hardreg: Enable propagation of the stack pointer if possible. To: Richard Biener Cc: Thiago Jung Bauermann , Jeff Law , Tamar Christina , Andrew Pinski , Manolis Tsamis , Palmer Dabbelt , Kito Cheng , "gcc-patches@gcc.gnu.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,JMQ_SPF_NEUTRAL,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: This should be covered by PR110308 (proposed fix attached there) and PR1103= 13. Our bootstrap runs are still in progress to confirm. On Thu, 22 Jun 2023 at 09:40, Richard Biener w= rote: > > On Thu, Jun 22, 2023 at 1:42=E2=80=AFAM Thiago Jung Bauermann > wrote: > > > > > > Hello, > > > > Jeff Law writes: > > > > > On 6/19/23 22:52, Tamar Christina wrote: > > > > > >>> It's a bit hackish, but could we reject the stack pointer for opera= nd1 in the > > >>> stack-tie? And if we do so, does it help? > > >> Yeah this one I had to defer until later this week to look at closer= because what I'm > > >> wondering about is whether the optimization should apply to frame re= lated > > >> RTX as well. > > >> Looking at the description of RTX_FRAME_RELATED_P that this optimiza= tion may > > >> end up de-optimizing RISC targets by creating an offset that is larg= er than offset > > >> which can be used from a SP making reload having to spill. i.e. som= etimes the > > >> move was explicitly done. So perhaps it should not apply it to > > >> RTX_FRAME_RELATED_P in find_oldest_value_reg and copyprop_hardreg_fo= rward_1? > > >> Other parts of this pass already seems to bail out in similar situat= ions. So I needed > > >> to > > >> write some testcases to check what would happen in these cases hence= the deferral. > > >> to later in the week. > > > Rejecting for RTX_FRAME_RELATED_P would seem reasonable and probably = better in general to > > > me. The cases where we're looking to clean things up aren't really i= n the > > > prologue/epilogue, but instead in the main body after register elimin= ation has turned fp > > > into sp + offset, thus making all kinds of things no longer valid. > > > > The problems I reported were fixed by commits: > > > > 580b74a79146 "aarch64: Robustify stack tie handling" > > 079f31c55318 "aarch64: Fix gcc.target/aarch64/sve/pcs failures" > > > > Thanks! > > > > But unfortunately I'm still seeing bootstrap failures (ICE segmentation > > fault) in today's trunk with build config bootstrap-lto in both > > armv8l-linux-gnueabihf and aarch64-linux-gnu. > > If there's not yet a bugreport for this please make sure to open one so > this issue doesn't get lost. > > > If I revert commit 6a2e8dcbbd4b "cprop_hardreg: Enable propagation of > > the stack pointer if possible" from trunk then both bootstraps succeed. > > > > Here's the command I'm using to build on armv8l: > > > > ~/src/configure \ > > SHELL=3D/bin/bash \ > > --with-gnu-as \ > > --with-gnu-ld \ > > --disable-libmudflap \ > > --enable-lto \ > > --enable-shared \ > > --without-included-gettext \ > > --enable-nls \ > > --with-system-zlib \ > > --disable-sjlj-exceptions \ > > --enable-gnu-unique-object \ > > --enable-linker-build-id \ > > --disable-libstdcxx-pch \ > > --enable-c99 \ > > --enable-clocale=3Dgnu \ > > --enable-libstdcxx-debug \ > > --enable-long-long \ > > --with-cloog=3Dno \ > > --with-ppl=3Dno \ > > --with-isl=3Dno \ > > --disable-multilib \ > > --with-float=3Dhard \ > > --with-fpu=3Dneon-fp-armv8 \ > > --with-mode=3Dthumb \ > > --with-arch=3Darmv8-a \ > > --enable-threads=3Dposix \ > > --enable-multiarch \ > > --enable-libstdcxx-time=3Dyes \ > > --enable-gnu-indirect-function \ > > --disable-werror \ > > --enable-checking=3Dyes \ > > --enable-bootstrap \ > > --with-build-config=3Dbootstrap-lto \ > > --enable-languages=3Dc,c++,fortran,lto \ > > && make \ > > profiledbootstrap \ > > SHELL=3D/bin/bash \ > > -w \ > > -j 40 \ > > CFLAGS_FOR_BUILD=3D"-pipe -g -O2" \ > > CXXFLAGS_FOR_BUILD=3D"-pipe -g -O2" \ > > LDFLAGS_FOR_BUILD=3D"-static-libgcc" \ > > MAKEINFOFLAGS=3D--force \ > > BUILD_INFO=3D"" \ > > MAKEINFO=3Decho > > > > And here's the slightly different one for aarch64-linux: > > > > ~/src/configure \ > > SHELL=3D/bin/bash \ > > --with-gnu-as \ > > --with-gnu-ld \ > > --disable-libmudflap \ > > --enable-lto \ > > --enable-shared \ > > --without-included-gettext \ > > --enable-nls \ > > --with-system-zlib \ > > --disable-sjlj-exceptions \ > > --enable-gnu-unique-object \ > > --enable-linker-build-id \ > > --disable-libstdcxx-pch \ > > --enable-c99 \ > > --enable-clocale=3Dgnu \ > > --enable-libstdcxx-debug \ > > --enable-long-long \ > > --with-cloog=3Dno \ > > --with-ppl=3Dno \ > > --with-isl=3Dno \ > > --disable-multilib \ > > --enable-fix-cortex-a53-835769 \ > > --enable-fix-cortex-a53-843419 \ > > --with-arch=3Darmv8-a \ > > --enable-threads=3Dposix \ > > --enable-multiarch \ > > --enable-libstdcxx-time=3Dyes \ > > --enable-gnu-indirect-function \ > > --disable-werror \ > > --enable-checking=3Dyes \ > > --enable-bootstrap \ > > --with-build-config=3Dbootstrap-lto \ > > --enable-languages=3Dc,c++,fortran,lto \ > > && make \ > > profiledbootstrap \ > > SHELL=3D/bin/bash \ > > -w \ > > -j 40 \ > > LDFLAGS_FOR_TARGET=3D"-Wl,-fix-cortex-a53-843419" \ > > CFLAGS_FOR_BUILD=3D"-pipe -g -O2" \ > > CXXFLAGS_FOR_BUILD=3D"-pipe -g -O2" \ > > LDFLAGS_FOR_BUILD=3D"-static-libgcc" \ > > MAKEINFOFLAGS=3D--force \ > > BUILD_INFO=3D"" \ > > MAKEINFO=3Decho > > > > -- > > Thiago