From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5E4FC3857025; Wed, 26 Oct 2022 12:13:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5E4FC3857025 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666786437; bh=mSAvipu1gUSzZSZ7yko78OfhsVCYJ3obaFpu8tqPFWI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=uuqndo++K3Bu74b5tWKDizIRvwshaQRNpJoHbZYS/LUwf2HTuJkPvGd2kWU0s/lGj I0b6YvtlGtFPV/WpHaghrR2Gs3c3eJ7dQpL8fTFNI19/YtIZzsmAaqPp+cMH49oDUe MIiTizTVAfNPqc27sPIDbzJBYJfTPteEGJhawVsw= From: "michael.meier at hexagon dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/107415] RISCV-gcc: Leaf function compiles as recursive with -O3 Date: Wed, 26 Oct 2022 12:13:57 +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: 12.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: michael.meier at hexagon dot com 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=3D107415 --- Comment #2 from Michael Meier --- (In reply to Andrew Pinski from comment #1) > Gcc can detect memset and optimize it to memset. And this is what is > happening.=20 > This is documented too. Thanks for your quick reply. I understand what is happening now. Now that you pointed me in this direction, I found many references to this behavior only, including that I can use -fno-tree-loop-distribute-patterns = to disable the optimization. However I didn't find mention of the feature in t= he official documentation. Can you provide me with a reference, please?=