From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id 7C4303959C4E for ; Tue, 6 Dec 2022 07:11:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7C4303959C4E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 5427C1FE70; Tue, 6 Dec 2022 07:11:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1670310713; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=OWiXFsCny0xc6Zv9UtXOj9A2fjOvqH7ESbWVTlfyU+k=; b=a2+W50dXBuihMHpba9WW/ehaSu5ECAzR5jHIBpbEQUdSopPsLc9fEy8vuF+AQBcBZZjl8g tH6CRGXlGgHRa+HAotfoALmdXO2vV8yPdzprS678N2ZTp7XyjeRe9hc/4PuYhyqeG76l94 FMeeviP5y7DHELf6wZg07gi2zTnzeIM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1670310713; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=OWiXFsCny0xc6Zv9UtXOj9A2fjOvqH7ESbWVTlfyU+k=; b=vfo4sZj0Jq5mD+Osal/1upO09zHxre78pP1bLkpemvMmmo6FUVtCJVbJU8nkzB5ArMlMnB zkKmPi3FX7DQBkCQ== Received: from wotan.suse.de (wotan.suse.de [10.160.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 345502C141; Tue, 6 Dec 2022 07:11:53 +0000 (UTC) Date: Tue, 6 Dec 2022 07:11:52 +0000 (UTC) From: Richard Biener To: Jan-Benedict Glaw cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] tree-optimization/107852 - missed optimization with PHIs In-Reply-To: <20221205213936.lmkfspepktu5ackp@lug-owl.de> Message-ID: References: <20221129133022.99C0C13AF6@imap2.suse-dmz.suse.de> <20221205213936.lmkfspepktu5ackp@lug-owl.de> User-Agent: Alpine 2.22 (LSU 394 2020-01-19) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="-1609957120-1101072928-1670310713=:17722" X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,SPF_HELO_NONE,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: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---1609957120-1101072928-1670310713=:17722 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT On Mon, 5 Dec 2022, Jan-Benedict Glaw wrote: > On Tue, 2022-11-29 14:30:22 +0100, Richard Biener via Gcc-patches wrote: > > Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. > > > > PR tree-optimization/107852 > > * tree-ssa-sccvn.cc (visit_phi): Use equivalences recorded > > as predicated values to elide more redundant PHIs. > > > > * gcc.dg/tree-ssa/ssa-fre-101.c: New testcase. > > This seems to trigger an issue when building the Linux powerpc kernel > for the skiroot_defconfig: > > [mk all 2022-12-05 19:50:10] powerpc64-linux-gcc -Wp,-MMD,drivers/dma-buf/.dma-fence-array.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 -DHAVE_AS_ATHIGH=1 -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 -std=gnu11 -mlittle-endian -m64 -msoft-float -pipe -mtraceback=no -mabi=elfv2 -mcmodel=medium -mno-pointers-to-nested-functions -mcpu=power8 -mtune=power10 -mno-prefixed -mno-pcrel -mno-altivec -mno-vsx -mno-mma -fno-asynchronous-unwind-tables -mno-string -Wa,-maltivec -Wa,-mpower4 -Wa,-many -mno -strict-align -mlittle-endian -mstack-protector-guard=tls -mstack-protector-guard-reg=r13 -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -Os -fno-allow-store-data-races -Wframe-larger-than=2048 -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-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 -mstack-protector-guard-offset=2800 -DKBUILD_MODFILE='"drivers/dma-buf/dma-fence-array"' -DKBUILD_BASENAME='"dma_fence_array"' -DKBUILD_MODNAME='"dma_fence_arra y"' -D__KBUILD_MODNAME=kmod_dma_fence_array -c -o drivers/dma-buf/dma-fence-array.o drivers/dma-buf/dma-fence-array.c > [mk all 2022-12-05 19:50:10] drivers/dma-buf/dma-fence-array.c: In function 'dma_fence_array_create': > [mk all 2022-12-05 19:50:10] drivers/dma-buf/dma-fence-array.c:154:25: error: control flow in the middle of basic block 12 > [mk all 2022-12-05 19:50:10] 154 | struct dma_fence_array *dma_fence_array_create(int num_fences, > [mk all 2022-12-05 19:50:10] | ^~~~~~~~~~~~~~~~~~~~~~ > [mk all 2022-12-05 19:50:10] during GIMPLE pass: ivopts > [mk all 2022-12-05 19:50:10] drivers/dma-buf/dma-fence-array.c:154:25: internal compiler error: verify_flow_info failed > [mk all 2022-12-05 19:50:10] 0x19ea876 internal_error(char const*, ...) > [mk all 2022-12-05 19:50:10] ???:0 > [mk all 2022-12-05 19:50:10] 0x94b00e verify_flow_info() > [mk all 2022-12-05 19:50:10] ???:0 > [mk all 2022-12-05 19:50:10] Please submit a full bug report, with preprocessed source (by using -freport-bug). > [mk all 2022-12-05 19:50:10] Please include the complete backtrace with any bug report. > [mk all 2022-12-05 19:50:10] See for instructions. > > Maybe you've got an idea, otherwise I'll try to reproduce it manually. > (That's all automated building.) I'll note the above ICE is quite a few passes later during IVOPTs so the change triggered a latent issue. Wild guessing makes me think it's some asm goto being mis-handled. Can you please open a bugreport and provide preprocessed source so one can reproduce this with a cc1 cross? Thanks, Richard. ---1609957120-1101072928-1670310713=:17722--