From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id 03FBD3858D38 for ; Thu, 22 Sep 2022 22:14:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 03FBD3858D38 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 28MMD3xt021049; Thu, 22 Sep 2022 17:13:03 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 28MMD2bA021048; Thu, 22 Sep 2022 17:13:02 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Thu, 22 Sep 2022 17:13:02 -0500 From: Segher Boessenkool To: "Kewen.Lin" Cc: GCC Patches , David Edelsohn , Peter Bergner Subject: Re: [PATCH] rs6000: Fix the condition with frame_pointer_needed_indeed [PR96072] Message-ID: <20220922221302.GK25951@gate.crashing.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-9.1 required=5.0 tests=BAYES_00,GIT_PATCH_0,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,KAM_SHORT,SPF_HELO_PASS,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: Hi! On Thu, Sep 22, 2022 at 09:41:42AM +0800, Kewen.Lin wrote: > * config/rs6000/rs6000-logue.cc (rs6000_emit_epilogue): Update the > condition for adding REG_CFA_DEF_CFA reg note with > frame_pointer_needed_indeed. > --- a/gcc/config/rs6000/rs6000-logue.cc > +++ b/gcc/config/rs6000/rs6000-logue.cc > @@ -4956,7 +4956,7 @@ rs6000_emit_epilogue (enum epilogue_type epilogue_type) > a REG_CFA_DEF_CFA note, but that's OK; A duplicate is > discarded by dwarf2cfi.cc/dwarf2out.cc, and in any case would > be harmless if emitted. */ > - if (frame_pointer_needed) > + if (frame_pointer_needed_indeed) > { > insn = get_last_insn (); I thought about adding an assert here, but the very next insn gives a clear enough message anyway, zo it would be just noise :-) > diff --git a/gcc/testsuite/gcc.target/powerpc/pr96072.c b/gcc/testsuite/gcc.target/powerpc/pr96072.c > new file mode 100644 > index 00000000000..23d1cc74ffd > --- /dev/null > +++ b/gcc/testsuite/gcc.target/powerpc/pr96072.c > @@ -0,0 +1,14 @@ > +/* { dg-options "-O1" } */ > + > +/* Verify there is no ICE on 32 bit environment. */ /* This used to ICE with the SYSV ABI (PR96072). */ Please use -O2 if that works here. Okay for trunk. Thank you! Segher