From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 367C73858C83; Wed, 19 Oct 2022 03:00:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 367C73858C83 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666148403; bh=xZXbnUautWxxxIHGNwuyQB+rLm13C6eeGK9AOaoFBrw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=bU0Baz6IRRsqoTyCfVWmNcbn2YNejik3p34nuTlKDnzJObZK5TXq7cR0bMXGT7Awf 6mhH3WiXIBHagNm9jFnXpPWdTE8SuazAEd8jmR2q+Dd9zPlVZRMjOPY0Zm+s6eP9z8 1LTI95hYKpxm0vCzDBl0t5Uj/eLe2WngUrXM88vs= From: "wwwhhhyyy333 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/107304] internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake Date: Wed, 19 Oct 2022 03:00:00 +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: 12.2.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: wwwhhhyyy333 at gmail dot com 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=3D107304 --- Comment #10 from Hongyu Wang --- (In reply to H.J. Lu from comment #9) > (In reply to Hongtao.liu from comment #8) > > (In reply to H.J. Lu from comment #7) > > > (In reply to Hongtao.liu from comment #6) > > > > (In reply to Hongtao.liu from comment #5) > > > > > (In reply to H.J. Lu from comment #4) > > > > > > Since the default is -march=3Dtigerlake, it enables AVX512 in t= he middle end. > > > > > > When "arch=3Dalderlake" disables AVX512, we fails to expand AVX= 512 to > > > > > > non-AVX512 > > > > > > ISAs. It means that target_clones can't be more restrictive tha= n the > > > > > > default. We > > > > > > should provide better diagnostics. > > > > >=20 > > > > > Is there any place checking ISA difference for target_clones? > > > >=20 > > > > ix86_valid_target_attribute_inner_p? > > >=20 > > > It may not have all ISA infos. Will this > > >=20 > > > diff --git a/gcc/config/i386/i386-options.cc > > > b/gcc/config/i386/i386-options.cc > > > index acb2291e70f..1efaae132e9 100644 > > > --- a/gcc/config/i386/i386-options.cc > > > +++ b/gcc/config/i386/i386-options.cc > > > @@ -2953,6 +2953,14 @@ ix86_option_override_internal (bool main_args_= p, > > > fine grained control & costing. */ > > > SET_OPTION_IF_UNSET (opts, opts_set, param_vect_partial_vector_usa= ge, 0); > > >=20=20 > > > + if (!main_args_p > > > + && &global_options !=3D opts > > > + && (((opts->x_ix86_isa_flags & global_options.x_ix86_isa_flags) > > > + !=3D global_options.x_ix86_isa_flags) > > > + || ((opts->x_ix86_isa_flags2 & global_options.x_ix86_isa_flags2) > > > + !=3D global_options.x_ix86_isa_flags2))) > > > + error ("Target ISAs are more restrictive than the default"); > > > + > > > return true; > > > } > > >=20=20 > > > work? > >=20 > > Looks reasonable to me. >=20 > It doesn't work since we may use target attribute to disable MMX/SSE/SSE2. > This problem seems to be __builtin_shuffle related. Clang works properly as it overrides -march=3D to any target clones. I supp= ose we can do similar things in ix86_valid_target_attribute_p https://godbolt.org/z/v7xT1zahd=