From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 356CE3860C37; Wed, 24 Mar 2021 09:47:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 356CE3860C37 From: "crazylht at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/99744] __attribute__ ((target("general-regs-only"))) doesn't work with GPR intrinsics Date: Wed, 24 Mar 2021 09:47:27 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: crazylht at gmail 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Mar 2021 09:47:28 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99744 --- Comment #2 from Hongtao.liu --- in ix86_can_inline_p ---- static bool ix86_can_inline_p (tree caller, tree callee) { tree caller_tree =3D DECL_FUNCTION_SPECIFIC_TARGET (caller); tree callee_tree =3D DECL_FUNCTION_SPECIFIC_TARGET (callee); ... if (!callee_tree) callee_tree =3D target_option_default_node; if (!caller_tree) caller_tree =3D target_option_default_node; if (callee_tree =3D=3D caller_tree) return true; ---- caller_tree is like: -m64 -mfxsr -m128bit-long-double -mfp-ret-in-387 -mieee-fp -mno-fancy-math-387 -mtls-direct-seg-refs -mvzeroupper -mstv -mgeneral-regs-only -mfpmath=3D387 callee_tree is null, then it's assigned with target_option_default_node whi= ch is like -m64 -msse2 -msse -mmmx -mfxsr -m128bit-long-double -m80387 -mfp-ret-in= -387 -mieee-fp -mtls-direct-seg-refs -mvzeroupper -mstv -mfpmath=3Dsse So should it's safe to inline when callee_tree is null?=