From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by sourceware.org (Postfix) with ESMTPS id 01E0F3858D1E for ; Mon, 26 Jun 2023 19:41:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 01E0F3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-x535.google.com with SMTP id 41be03b00d2f7-5440e98616cso3174496a12.0 for ; Mon, 26 Jun 2023 12:41:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687808506; x=1690400506; 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=LMsZnxAdY9B2dwG/xnRDHo0zL721vL+wrVzXyQUwVYE=; b=B4nmi9Fkm+LGBvtbgnCXe89qFhl320yfc1z2qa4FpwmALNGkN9Uj4ECFQAfLY0Ezwh WEMUfgzhOeM9E4BIGPaqAEp+2VINBQbInaxcqr8Fd1wR+M3wmvnSpT2S3q44JyxTzsqT 6+9RE/FFXBSikImpdjP8p2o7PCpPHyfFrBMg2DqcgvLiaN0JsKcUknBn3aYzdOID6xtu ZGfa1yjZbdK1/jBTK6yz2O6QNa0XAxKNCG/q643Qub+CpyG1bIq5Z54FdOBLmE79rBM9 Z++II7NSqAfk0C827BfemzR6StnGV9Jd8MPG+0/G30mtZawc80jKEJXCij0/xCEuPsQZ Q/Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687808506; x=1690400506; 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=LMsZnxAdY9B2dwG/xnRDHo0zL721vL+wrVzXyQUwVYE=; b=ieEVfpMuMLuiszBuCYUgx52ETn17VpnDruzDH6dzfCvnLd98IEjCTO8hjhJkIw44W1 MpnmFMhHqO1Smp4yc21BdFse5npnsrYDpIyPNX6u8UFbjnoYOHu71fLGZhQ7LvYj9eF7 ow5vnwiHAiPXWNtWDL0t3V/uTm2Y+O4d4kzB7FThvirJCBYCEaBI1zUZsmHpovAoCEDR tOkWM52UJpymlCJnEY9L5EfL3UqCKy+1OJ56SNU8CyVHf7xIUVJIQwQWZSykmPIZ3cxU qLT1lvN/2oHuECK1J+aZPYbJIMf8qUfvycJmxmmLoCRJTVbxv+odS933nygv9IVDDOTY G5CQ== X-Gm-Message-State: AC+VfDwjyAFGFF9vG3PFLxt7xIqdm+ZGiA4UsnEzEDK7qv6eMGWoQJ6t UYsl+/nH0/bri/MXyRkG3h5gDJXjbkte41L+28o= X-Google-Smtp-Source: ACHHUZ5SpKZoszVQQ+gzTSLEJ7iGeMdu9ojzd6uSkR0BA4/7VAucPOqcsEDDVD69buPW4t6oiJ21a0K/r1WHg4wNvxM= X-Received: by 2002:a17:90b:3684:b0:260:b83e:89d4 with SMTP id mj4-20020a17090b368400b00260b83e89d4mr28548499pjb.15.1687808506461; Mon, 26 Jun 2023 12:41:46 -0700 (PDT) MIME-Version: 1.0 References: <20230505151719.1031737-1-apinski@marvell.com> <20230626055827.t57twu4yykagzdpt@lug-owl.de> In-Reply-To: From: Andrew Pinski Date: Mon, 26 Jun 2023 12:41:33 -0700 Message-ID: Subject: Re: [PATCH] Move substitute_and_fold over to use simple_dce_from_worklist To: Jan-Benedict Glaw Cc: Andrew Pinski , gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE,WEIRD_PORT 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: On Mon, Jun 26, 2023 at 11:49=E2=80=AFAM Andrew Pinski = wrote: > > On Mon, Jun 26, 2023 at 9:13=E2=80=AFAM Andrew Pinski = wrote: > > > > On Sun, Jun 25, 2023 at 10:59=E2=80=AFPM Jan-Benedict Glaw wrote: > > > > > > Hi Andrew, > > > > > > On Fri, 2023-05-05 08:17:19 -0700, Andrew Pinski via Gcc-patches 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/generate= d/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux= /compiler-version.h -include ./include/linux/kconfig.h -include ./include/l= inux/compiler_types.h -D__KERNEL__ -I ./arch/powerpc -fmacro-prefix-map=3D.= /=3D -Wall -Wundef -Werror=3Dstrict-prototypes -Wno-trigraphs -fno-strict-a= liasing -fno-common -fshort-wchar -fno-PIE -Werror=3Dimplicit-function-decl= aration -Werror=3Dimplicit-int -Werror=3Dreturn-type -Wno-format-security -= funsigned-char -std=3Dgnu11 -mbig-endian -m32 -msoft-float -pipe -ffixed-r2= -mmultiple -mno-readonly-in-sdata -mcpu=3D860 -mno-prefixed -mno-pcrel -mn= o-altivec -mno-vsx -mno-mma -fno-asynchronous-unwind-tables -mno-string -mb= ig-endian -mstack-protector-guard=3Dtls -mstack-protector-guard-reg=3Dr2 -f= no-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wn= o-format-overflow -Wno-address-of-packed-member -O2 -fno-allow-store-data-r= aces -Wframe-larger-than=3D1024 -fstack-protector-strong -Wno-main -Wno-unu= sed-but-set-variable -Wno-unused-const-variable -Wno-dangling-pointer -fomi= t-frame-pointer -ftrivial-auto-var-init=3Dzero -fno-stack-clash-protection = -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wcast-function-type = -Wno-stringop-truncation -Wno-stringop-overflow -Wno-restrict -Wno-maybe-un= initialized -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallth= rough=3D5 -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=3D= date-time -Werror=3Dincompatible-pointer-types -Werror=3Ddesignated-init -W= no-packed-not-aligned -g -mstack-protector-guard-offset=3D544 -Werror -DUTS= _MACHINE=3D'"ppc"' -DKBUILD_MODFILE=3D'"arch/powerpc/kernel/ptrace/ptrac= e-view"' -DKBUILD_BASENAME=3D'"ptrace_view"' -DKBUILD_MODNAME=3D'"ptrace_vi= ew"' -D__KBUILD_MODNAME=3Dkmod_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_comm= on': > > > arch/powerpc/kernel/ptrace/ptrace-view.c:649:5: internal compiler err= or: 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 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. Thanks, Andrew > > > > > Thanks, > > Andrew > > > > > > > > > > > > > (Full log at http://toolchain.lug-owl.de/laminar/jobs/linux-powerpc-a= dder875_defconfig/100) > > > > > > Thanks, > > > Jan-Benedict > > > > > > --