From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6067A3858D37; Thu, 28 Dec 2023 05:08:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6067A3858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1703740122; bh=027e5FZgOGdh/jxYBdKKAeEaz42IfK7dgPqV2clFARA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=LAYgd9yJHCKbk+MFGSrwR7BMwAhhdMgthCHqVrckwf65rPM2st7rfoOrdhp+sq83t nhEhjvWHzhrPk7UbkYPSeo6XKy+Ui0pwCJMRwaIJBrRrA6Dd7ifHFpp2a83M6z2c4r FARnd34s+C4i2f3Rzhx/iRdo4oP+KCIGekKLZv6I= 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 05:08:41 +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 #16 from Tamar Christina --- >=20 > I wonder whether ARM SVE can also use this approach VEC_EXTRACT with inde= x =3D > 0. Perhaps, I'll look into it thanks. though this is ofcourse only applicable = when the mask comes from whilelo. In the future when we get to loops such as: for (int i =3D ..;;) { if (a) { .... if (b) return i; } } the reduction would come from the first active element of the mask created = by the condition a and not the whilelo.=