From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 147ED3858D3C; Tue, 12 Sep 2023 07:52:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 147ED3858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1694505163; bh=DhGS6r3A5eH0nGB77R2vBB54uE0tTsGzIK0ufy3V/BE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=aBUY1ucWouG+/NTEGJIaGgxwhSTI9lUIyT8I1JwT3qHBlYaTa1bQgXGr6pG4iMYsU ANIvNFNsMfxybZWA8szxlo+Za2DgWvfFIhL5JfOvGcAg1Mv4wGhwJJqc3wQcEoNe6p mVt6OLj0d8HZ3y61YdzscGF7Mgnqb73dQaBXl7gk= From: "linkw at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/111366] error: inlining failed in call to 'always_inline' 'hwy::PreventElision(int&)void': target specific option mismatch Date: Tue, 12 Sep 2023 07:52:42 +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: 13.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: linkw at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: linkw at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to bug_status 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=3D111366 Kewen Lin changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |linkw at gcc dot gn= u.org Status|NEW |ASSIGNED --- Comment #14 from Kewen Lin --- Both the reduced test case and the upstream code (https://github.com/google/highway/blob/master/hwy/base.h) have empty inline asm string, one quick simple fix can treat empty asm string specially: diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc index efe9adce1f8..6ef75164d08 100644 --- a/gcc/config/rs6000/rs6000.cc +++ b/gcc/config/rs6000/rs6000.cc @@ -25475,9 +25475,11 @@ rs6000_update_ipa_fn_target_info (unsigned int &in= fo, const gimple *stmt) /* Assume inline asm can use any instruction features. */ if (gimple_code (stmt) =3D=3D GIMPLE_ASM) { - /* Should set any bits we concerned, for now OPTION_MASK_HTM is - the only bit we care about. */ - info |=3D RS6000_FN_TARGET_INFO_HTM; + const char *asm_str =3D gimple_asm_string (as_a (stmt)= ); + if (strlen (asm_str) > 0) + /* Should set any bits we concerned, for now OPTION_MASK_HTM is + the only bit we care about. */ + info |=3D RS6000_FN_TARGET_INFO_HTM; return false; } else if (gimple_code (stmt) =3D=3D GIMPLE_CALL)=