public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew Pinski <pinskia@gmail.com>
To: Jan-Benedict Glaw <jbglaw@lug-owl.de>
Cc: Andrew Pinski <apinski@marvell.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Move substitute_and_fold over to use simple_dce_from_worklist
Date: Mon, 26 Jun 2023 16:34:05 -0700	[thread overview]
Message-ID: <CA+=Sn1kF=ApTW41+TyGUFuHxPtLP4Gw8UtBAJmmTuvJ5y4ywWw@mail.gmail.com> (raw)
In-Reply-To: <CA+=Sn1n3RP_Kd5dkRzUzga1Y8eo_snq-CshCobn+a4-fUT9xQw@mail.gmail.com>

On Mon, Jun 26, 2023 at 12:41 PM Andrew Pinski <pinskia@gmail.com> wrote:
>
> On Mon, Jun 26, 2023 at 11:49 AM Andrew Pinski <pinskia@gmail.com> wrote:
> >
> > On Mon, Jun 26, 2023 at 9:13 AM Andrew Pinski <pinskia@gmail.com> wrote:
> > >
> > > On Sun, Jun 25, 2023 at 10:59 PM Jan-Benedict Glaw <jbglaw@lug-owl.de> wrote:
> > > >
> > > > Hi Andrew,
> > > >
> > > > On Fri, 2023-05-05 08:17:19 -0700, Andrew Pinski via Gcc-patches <gcc-patches@gcc.gnu.org> wrote:
> > > > > While looking into a different issue, I noticed that it
> > > > > would take until the second forwprop pass to do some
> > > > > forward proping and it was because the ssa name was
> > > > > used more than once but the second statement was
> > > > > "dead" and we don't remove that until much later.
> > > > [...]
> > > > > OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.
> > > >
> > > > Since this patch, I see a bit of fallout building the Linux kernel
> > > > using the adder875_defconfig:
> > > >
> > > > # CC      arch/powerpc/kernel/ptrace/ptrace-view.o
> > > >   powerpc-linux-gcc -Wp,-MMD,arch/powerpc/kernel/ptrace/.ptrace-view.o.d -nostdinc -I./arch/powerpc/include -I./arch/powerpc/include/generated  -I./include -I./arch/powerpc/include/uapi -I./arch/powerpc/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -I ./arch/powerpc -fmacro-prefix-map=./= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -funsigned-char -std=gnu11 -mbig-endian -m32 -msoft-float -pipe -ffixed-r2 -mmultiple -mno-readonly-in-sdata -mcpu=860 -mno-prefixed -mno-pcrel -mno-altivec -mno-vsx -mno-mma -fno-asynchronous-unwind-tables -mno-string -mbig-endian -mstack-protector-guard=tls -mstack-protector-guard-reg=r2 -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 -fno-allow-store-data-races -Wframe-larger-than=1024 -fstack-protector-strong -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-dangling-pointer -fomit-frame-pointer -ftrivial-auto-var-init=zero -fno-stack-clash-protection -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-truncation -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -g -mstack-protector-guard-offset=544 -Werror -DUTS_MACHINE='"ppc"'    -DKBUILD_MODFILE='"arch/powerpc/kernel/ptrace/ptrace-view"' -DKBUILD_BASENAME='"ptrace_view"' -DKBUILD_MODNAME='"ptrace_view"' -D__KBUILD_MODNAME=kmod_ptrace_view -c -o arch/powerpc/kernel/ptrace/ptrace-view.o arch/powerpc/kernel/ptrace/ptrace-view.c
> > > > during GIMPLE pass: pre
> > > > arch/powerpc/kernel/ptrace/ptrace-view.c: In function 'gpr32_set_common':
> > > > arch/powerpc/kernel/ptrace/ptrace-view.c:649:5: internal compiler error: in gimple_redirect_edge_and_branch, at tree-cfg.cc:6262
> > > >   649 | int gpr32_set_common(struct task_struct *target,
> > > >       |     ^~~~~~~~~~~~~~~~
> > > > 0x1a562a6 internal_error(char const*, ...)
> > > >  ???:0
> > > > 0x826ea1 fancy_abort(char const*, int, char const*)
> > > >  ???:0
> > > > 0x9b77c9 redirect_edge_and_branch(edge_def*, basic_block_def*)
> > > >  ???:0
> > > > 0x9b7e43 split_edge(edge_def*)
> > > >  ???:0
> > > > 0xee1cc7 split_critical_edges(bool)
> > > >  ???:0
> > > > Please submit a full bug report, with preprocessed source (by using -freport-bug).
> > > > Please include the complete backtrace with any bug report.
> > > > See <https://gcc.gnu.org/bugs/> for instructions.
> > > > make[4]: *** [scripts/Makefile.build:252: arch/powerpc/kernel/ptrace/ptrace-view.o] Error 1
> > > > make[3]: *** [scripts/Makefile.build:494: arch/powerpc/kernel/ptrace] Error 2
> > > > make[2]: *** [scripts/Makefile.build:494: arch/powerpc/kernel] Error 2
> > > > make[1]: *** [scripts/Makefile.build:494: arch/powerpc] Error 2
> > > > make: *** [Makefile:2026: .] Error 2
> > >
> > > Can you file a bug (https://gcc.gnu.org/bugzilla/) with the
> > > preprocessed source (which -freport-bug will provide). In the meantime
> > > I will try to reproduce it and see what is going on.
> >
> > Note I am suspecting it is related to GCC PR 103979 . I am still
> > trying to reproduce the ICE.
>
> I am 99% sure it is more related to PR 105165 really. Where PRE is now
> trying to insert on a critical edge and that is failing ...
> Basically my patch removes some extra statements (unrelated to the asm
> goto) and that causes the IR to be enough different that PRE is now
> failing.

So I found a testcase which fails before this patch, though the
problem is simple_dce_from_worklist is removing the `asm goto` which
is wrong.

Thanks,
Andrew Pinski


>
> Thanks,
> Andrew
>
> >
> > >
> > > Thanks,
> > > Andrew
> > >
> > >
> > > >
> > > >
> > > > (Full log at http://toolchain.lug-owl.de/laminar/jobs/linux-powerpc-adder875_defconfig/100)
> > > >
> > > > Thanks,
> > > >   Jan-Benedict
> > > >
> > > > --

  reply	other threads:[~2023-06-26 23:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-05 15:17 Andrew Pinski
2023-05-08  6:14 ` Richard Biener
2023-06-26  5:58 ` Jan-Benedict Glaw
2023-06-26 16:13   ` Andrew Pinski
2023-06-26 18:49     ` Andrew Pinski
2023-06-26 19:41       ` Andrew Pinski
2023-06-26 23:34         ` Andrew Pinski [this message]
2023-06-26 22:17     ` Jan-Benedict Glaw

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+=Sn1kF=ApTW41+TyGUFuHxPtLP4Gw8UtBAJmmTuvJ5y4ywWw@mail.gmail.com' \
    --to=pinskia@gmail.com \
    --cc=apinski@marvell.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jbglaw@lug-owl.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).