From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EFD463858C3A; Fri, 13 Oct 2023 06:54:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EFD463858C3A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1697180057; bh=oO3lXLk7KlbyThgdmfl2VvP+l+2GwDEZDz4G/gkv7MQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=dJuYdKX0FyHufS9BgMDmCv3H7wSO8LsyDBC98R5JQC4AGGay6xdbNvTuRAviy2yu8 Gwlm8uYy1IHHUgQN+KhTTDa2wkaFqJA+H2OqCn+tTGKRyQDpD8bEs9NsVZ++NyHUDh 99KXsCoboD78/YttBwlmRikRm/MHSkZHVzh6cFls= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/111791] RISC-V: Strange loop vectorizaion on popcount function Date: Fri, 13 Oct 2023 06:54:17 +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: missed-optimization X-Bugzilla-Severity: normal 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=3D111791 --- Comment #2 from Richard Biener --- It does do that (if there's a POPCOUNT optab, that is). Replacing with __builtin_popcount would eventually lead to an infinite recursion in this c= ase ;) (see that old memcpy + ldist bug)=