From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 546D73858D32; Thu, 28 Dec 2023 04:05:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 546D73858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1703736346; bh=XhRQfYPMOiaEwS/lkQbIwu9bioHHChQb++Ig6FQBkaQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=VQEa39Yx3Rf1IMRS3z5DtGC67vM9Z7Bcono9zCeqE55pDwN2STFvMOu1QTIsdr7Yx zJQuSIO2i1gqnMCo+k5V0NQac4OgM5HouqaO+iY31YA7RFrv/pIhJtxkhbNCXhbGCU nFIOwyvhlBwm/8okjVEHRWX2OgH91xB0zLQ1EWFw= From: "tnfchris at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/113134] gcc does not version loops with early break conditions that don't have side-effects Date: Thu, 28 Dec 2023 04:05:46 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: tnfchris 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=3D113134 --- Comment #7 from Tamar Christina --- You may be able to use the same approach as else if (LOOP_VINFO_FULLY_MASKED_P (loop_vinfo)) that is, reverse both the mask and the vector and using extract last. It's not going to be performance critical so it's more important to be corr= ect rather than fast.=