From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E849C3853820; Fri, 21 Oct 2022 09:29:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E849C3853820 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666344551; bh=2uYcqMrEv95enz8ceUx3TSR5qNAKix+SGYfhLC0E3uQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=iV8o1UqRPUb2qaEQgR8oDirYMyMR0As1fwL0/Rj0hXwfWPd+PE7Vm/uccFAHykFHl u7a0grs/GoMide9MoKh6vQNuei7kVSaizM777RSlqRNbpDwjk8JmX2gM6CY9FYk5Mv LiTMAG0NcsIxPrjHz54lOkh0b5bmOdF3B05xrQu8= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/107195] [13 Regression] wrong code with "-O1 -fno-tree-ccp" on x86_64-linux-gnu since r13-3090-gdf4c584c567263fd Date: Fri, 21 Oct 2022 09:29:11 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107195 --- Comment #11 from CVS Commits --- The master branch has been updated by Thomas Schwinge : https://gcc.gnu.org/g:a9de836c2b22f878cff592b96e11c1b95d4d36ee commit r13-3434-ga9de836c2b22f878cff592b96e11c1b95d4d36ee Author: Thomas Schwinge Date: Sun Oct 16 00:07:20 2022 +0200 Restore 'libgomp.oacc-c-c++-common/nvptx-sese-1.c' SESE regions checking [PR107195, PR107344] That is, adjust for optimization introduced with recent commit r13-3217-gc4d15dddf6b9eacb36f535807ad2ee364af46e04 "[PR107195] Set range to zero when nonzero mask is 0", where GCC now understands that after 'r *=3D 2;', 'r & 1' will never hold here, and t= hus transforms/optimizes/"disturbs" the original code such that GCC/nvptx's later "Neuter whole SESE regions" optimization no longer is applicable to it: UNSUPPORTED: libgomp.oacc-c/../libgomp.oacc-c-c++-common/nvptx-sese= -1.c -DACC_DEVICE_TYPE_nvidia=3D1 -DACC_MEM_SHARED=3D0 -foffload=3Dnvptx-none -= O0 PASS: libgomp.oacc-c/../libgomp.oacc-c-c++-common/nvptx-sese-1.c -DACC_DEVICE_TYPE_nvidia=3D1 -DACC_MEM_SHARED=3D0 -foffload=3Dnvptx-none -= O2 (test for excess errors) PASS: libgomp.oacc-c/../libgomp.oacc-c-c++-common/nvptx-sese-1.c -DACC_DEVICE_TYPE_nvidia=3D1 -DACC_MEM_SHARED=3D0 -foffload=3Dnvptx-none -= O2=20 execution test [-PASS:-]{+FAIL:+} libgomp.oacc-c/../libgomp.oacc-c-c++-common/nvptx-sese-1.c -DACC_DEVICE_TYPE_nvidia=3D1 -DACC_MEM_SHARED=3D0 -foffload=3Dnvptx-none -= O2=20=20 scan-nvptx-none-offload-rtl-dump mach "SESE regions:.* [0-9]+{[0-9]+->[0-9]+(\\.[0-9]+)+}" Same for C++. It's unclear to me if this is an actual "problem", which optimization is "more important", so I've filed PR107344 "GCC/nvptx SESE region optimization"= to capture this question, and here restore what we intend to be testing (t= o my understanding) in 'libgomp.oacc-c-c++-common/nvptx-sese-1.c'. PR tree-optimization/107195 PR target/107344 libgomp/ * testsuite/libgomp.oacc-c-c++-common/nvptx-sese-1.c: Restore S= ESE regions checking.=