From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9F3373858431; Fri, 19 Jan 2024 11:09:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9F3373858431 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705662545; bh=m7XsXJbGE3MD+WqIzBVojD26qhWXOHGWnH0i4oGZmcA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=af7m9zVho0lmopHy/ltItzBE5JwLGG5xoyBXKSCg/SVscBxalcKhTMFB1vq6OpY/T G3yM9/m0rWfddI3ijaHUOlfFFX4BKAfqhfBY33gCcFamtUN0cDliDg+6bb60GsJkN+ zUd7o+Tvqj8hhURrERsFVOk6nGhVXc9e7agiuPL4= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/113478] -Os does not inline single instruction function Date: Fri, 19 Jan 2024 11:09:04 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 13.2.1 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=3D113478 --- Comment #3 from Richard Biener --- (In reply to Jan Hubicka from comment #2) > Probably is_inexpensive_bulitin_p should return true here? Possibly, at least when we know it doesn't expand to a libatomic call? OTOH even then a function just wrapping such call should probably be inlined, so the question is whether the problem that _3 =3D &MEM[(const struct __atomic_base *)this_1(D)]._M_i; freq:1.00 size: 0 time: 0 _4 =3D __atomic_load_1 (_3, 0); freq:1.00 size: 4 time: 13 _5 =3D (char) _4; freq:1.00 size: 0 time: 0 return _5; freq:1.00 size: 1 time: 2 is estimated as too big compared to the call calling the function (OTOH a1.test () has no arguments while __atomic_load_1 has two).=