From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 758EE3857705; Fri, 6 Oct 2023 09:44:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 758EE3857705 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1696585489; bh=I9HfJJGSpqKKRLHYdDlZ5dWZcUfTBXyXE/Qa+00n9KA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=uiaQK5TbyShuA8nCr56RXrEItyc+Pk5l/tYB/3dtIimLc8MyotXfiYsEHDEbarhD/ nIbfdCAlmPZq9T9JdRepDRsoTqLy5Zawl9Gn/yyfyeHKaimqsObrc7K2LlzR5Kgvwn T2UEV59JPWURCgfxSIBY3ghWD1h/3VDHYgt5J2YY= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109088] GCC does not always vectorize conditional reduction Date: Fri, 06 Oct 2023 09:44:33 +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: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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=3D109088 --- Comment #14 from Richard Biener --- Sorry for the delay - but this looks exactly like Robins transform to COND_= ADD, no? But sure, the current code doesn't handle a reduction path through multiple stmts but when if-conversion would convert the final add to a COND= _ADD then it should be a matter of teaching tree-vect-loop.cc:check_reduction_path about conditional operations?=