From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4A0543858422; Mon, 8 Jan 2024 09:00:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4A0543858422 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1704704412; bh=2DgWO6TIJu215X7AEZ0g5G0Y72Hr4Lqxi43q3aN9Au4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ox+urJbobVJma1S12FkG0LWwxgG51NiU9QzRqwXa4bXBcwZMCz+tWNMOfFm82rJA4 kCrM25NRJxyrdVGO0rKM105Hhv9b96E03WpFXFW7/ff3tY1KlBYNE/HykRB+uwQeAh j+ec+wUkAm0GlF4h5X13Xdi9RXVQNeY4nskOtuwA= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/112457] Possible better vectorization of different reduction min/max reduction Date: Mon, 08 Jan 2024 09:00:10 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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=3D112457 --- Comment #5 from Richard Biener --- You want to find the duplicate bugreport for the min/max + index reductions, IIRC the issue is that we fail the reduction detection because of multi-use and we should really have two conditional reductions, one on the value and one on the index without trying to be too clever combining them into a sing= le one. That is, don't try to invent sth completely new based on what LLVM does but understand what's missing in GCCs handling of conditional reductions (it can do conditional value and conditional index reductions just fine, just not both at the same time IIRC).=