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