| Message ID | or8qiix24c.fsf@lxoliva.fsfla.org |
|---|---|
| State | New |
| Headers |
Return-Path: <gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2AF5E3857C4F for <patchwork@sourceware.org>; Sat, 13 Sep 2025 07:07:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2AF5E3857C4F Authentication-Results: sourceware.org; dkim=pass (2048-bit key, secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=jDwdtm44 X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by sourceware.org (Postfix) with ESMTPS id 7BB9C3857C4F for <gcc-patches@gcc.gnu.org>; Sat, 13 Sep 2025 07:06:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7BB9C3857C4F Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7BB9C3857C4F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::632 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1757747218; cv=none; b=jTfNyTJ32dxTy8CQrcL6Fe157sTfBjf4Fy+/JgOErpe72ALx1RsVTeNgN+qAI1X+TfPVONGzQ3MiJ+PLD4kFS3OU8E0hQK1FiplsSFhwlSeUffOjCXmR079nmZnDEDea1Ef+EMX93W9C8QcDYznCxGc2fW0MFxdVZDmb8UDcLgg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1757747218; c=relaxed/simple; bh=j+vmRZ82IzNpzvSpdKoApfhOxKqTc3HIkU/qjBn53XU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=jHdR32lIFpEwvl5ouyJUKcuZPp2tKyLHPD5uhdoA6on7RP6C994MtOLt28UMLgEUgHS3rmkg/Sq6afJb1/Rg38XqmBda8HspqeHZv8NM49av3Bc3p+PqsI08goxGGyDN0B5LB5dEdm3agRzutam5iO3gjwSb53TvUWVQha9dhIw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7BB9C3857C4F Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-24eb713b2dfso22470595ad.0 for <gcc-patches@gcc.gnu.org>; Sat, 13 Sep 2025 00:06:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1757747217; x=1758352017; darn=gcc.gnu.org; h=mime-version:user-agent:message-id:in-reply-to:date:references :organization:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=s55cBOyKoYCphWUhnlSxCtdtbsgEsMlVZx9AerkeJ8c=; b=jDwdtm44CyX32Gg8xSQW3Jj9H5CHihrX1SexMlOJqqHu8e3RjQNpP1iYM5Sw7GJrp+ scGPADzKUMaxjtTFXdytKAfOQoyv5PlUSZqyshj7fESLNIhLl4+ExAETnBuom6uFD+V1 7L6bGRHZmhum5NCseSwpvUpqwpaKBfcpi3ZANE0kk1S7byvFwRfVnk0punqRohFpUE3K 0+Y/bLwLKrxDeVYV+N6yIczluf+B3w7oYJYaO7viuQkTzrdKGd5aukVr8ZbIrkDqev8N rK/4eVEJSrPSky5UXpt7nYGOBCzJg1aH2DkVJe3RSUmwAUFY900tDOlkxy+WYyFSsMXk 3akw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757747217; x=1758352017; h=mime-version:user-agent:message-id:in-reply-to:date:references :organization:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=s55cBOyKoYCphWUhnlSxCtdtbsgEsMlVZx9AerkeJ8c=; b=Rr3ZCNkObVK5cH2l5hh8ql6FBVhOe2p1T8z5q/CxMUFbiayoUtrciz2bebwdmYgSsk fJiutPCBDV9lgS9AO1nZFEnlkJFJIdCGggBmwZtgevTVOJPslOI8t8ZgJNPhp9GTHyDR 5BZosEbdulyeKvRehaDyuhKROHIgiDG5PAjcCfhpZBqkHAjZZBrbrrSoJGa2gRif14h/ w8kMvPnKuALjJSer6EpFYlySS7ZL6m3zByHJznqP+l5bRyhZoD8WZrlyvqtFr+bqtUO8 aeJyRGaFRqqe7bj6C+vtUTR9IPJnkvCf4No5y+Xpmq5+las9crx0H4TtnCB1HS+5sTxi ltZg== X-Gm-Message-State: AOJu0Ywm1rAjJXb6XoeiEBFPWcCwzKsw//9O5FgKck59ghUt8RX4wH4k Zw0aEgVNl3+7pcrJCkt93YvQhuN2QKpjqCc59qy5mfxyS5UmE89iZFgIJqGfWqjZtvZ10UFZ3iA CjEXVcQ== X-Gm-Gg: ASbGncsjsa4LfozOO33wKxmUG9cub4JpiyvPZ285X+I4CCPkVfqi/7+iveyzm5a6G/l I5SoEt5H7kPejRfjzSJpxIzluKyPspdht+Yl0DQeyleD5KD1JmFns6Mc0sUIAXRTp4poDJUEaY3 hprG4pzR423bQudhZFKA/zSaM3txGSZvlp0AL/vfusli9qYXI3g5Ph6yNtd9q702uC0j7PAHcxk XFogCHq6VXgyDhOdu6E94zKoylJxtwqIpSRGH/2YxpbexGsyjIHV8xf3dnedhbK31+TeW7KIcrc V5wPHPhW4SxzUXK4bmbPk8JdkBOxi7gfvqcQ5tzvlDyDyV8tEgGJ72Wvt6nbAGDoWgWsyCByJy1 ugAOQ7xEFm/blO0k= X-Google-Smtp-Source: AGHT+IHg6YNN3wPBNMThIJaej04ldZOa9jMRj8wPAY9fHdG48eIeSRbWI8dZYb+gJd6YqenZIF44gw== X-Received: by 2002:a17:902:e808:b0:24d:98bc:a315 with SMTP id d9443c01a7336-25d242f30d8mr64622275ad.6.1757747217460; Sat, 13 Sep 2025 00:06:57 -0700 (PDT) Received: from free.home ([2804:7f1:218c:71:f23c:affb:45e1:1f0a]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-25e044b88bfsm34649275ad.22.2025.09.13.00.06.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Sep 2025 00:06:57 -0700 (PDT) Received: from livre (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTPS id 58D76h1D2083835 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Sat, 13 Sep 2025 04:06:43 -0300 From: Alexandre Oliva <oliva@adacore.com> To: gcc-patches@gcc.gnu.org Cc: Vladimir Makarov <vmakarov@redhat.com>, Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>, Mike Stump <mikestump@comcast.net>, Richard Earnshaw <richard.earnshaw@arm.com>, Tamar Christina <tamar.christina@arm.com>, Kyrylo Tkachov <ktkachov@nvidia.com> Subject: [PATCH 2/2] [ira] avoid resetting ira_reg_equiv for function invariants Organization: Free thinker, does not speak for AdaCore References: <orldmix3cw.fsf@lxoliva.fsfla.org> Date: Sat, 13 Sep 2025 04:06:43 -0300 In-Reply-To: <orldmix3cw.fsf@lxoliva.fsfla.org> (Alexandre Oliva's message of "Sat, 13 Sep 2025 03:39:59 -0300") Message-ID: <or8qiix24c.fsf@lxoliva.fsfla.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.84 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, WEIRD_QUOTING autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org |
| Series |
None
|
|
Commit Message
Alexandre Oliva
Sept. 13, 2025, 7:06 a.m. UTC
An aarch64 toolchain built with --enable-default-pie fails gcc.target/aarch64/sme/nonlocal_goto_[123].c because the register allocator ends up resetting equivalences, so it concludes it needs to preserve a rematerializable function invariant across a call instead of rematerializing it. Allow function invariant equivalences to remain when the other circumstances that may require their removal don't apply. Tested on aarch64-linux-gnu with --enable-default-pie --enable-host-pie, but I note this is not a complete fix for the problem, and I'm not confident it's safe. Does this look ok to install? for gcc/ChangeLog * ira.cc (setup_reg_equiv): Retain function invariant equivalences. --- gcc/ira.cc | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/gcc/ira.cc b/gcc/ira.cc index 4eebc9c4c50fb..79cf9a413cfb2 100644 --- a/gcc/ira.cc +++ b/gcc/ira.cc @@ -4278,6 +4278,9 @@ setup_reg_equiv (void) continue; } } + else if (function_invariant_p (x)) + /* Leave ira_reg_equiv alone. */ + continue; } ira_reg_equiv[i].defined_p = false; ira_reg_equiv[i].caller_save_p = false;