Commit 604ab090 by H.J. Lu

x86: Update message for target_clones and unsupported ISAs

Before AVX512F, processors with the newer ISAs also support the older
ISAs, i.e., AVX2 processors also support AVX and SSE4, SSE4 processors
also support SSSE3, ...   After AVX512F, an AVX512XX processor may not
support AVX512YY.  It means AVX512XX features, except for AVX512F, can't
be used to decide priority in target_clones.

This patch updates error message for ISAs with P_ZERO priority.  It also
merges _feature_list into _isa_names_table and marks ISAs, which have
unknown priority, with P_ZERO so that we only need to update one place
to add a new ISA feature.

gcc/

2019-04-25  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/89929
	* config/i386/i386.c (feature_priority): Moved to file scope.
	(processor_features): Likewise.
	(processor_model): Likewise.
	(_arch_names_table): Likewise.
	(arch_names_table): Likewise.
	(_feature_list): Removed.
	(feature_list): Likewise.
	(_isa_names_table): Moved to file scope.  Add priority.
	(isa_names_table): Likewise.
	(get_builtin_code_for_version): Replace feature_list with
	isa_names_table.  Update error message for P_ZERO priority.

gcc/testsuite/

2019-04-25  Martin Liska  <mliska@suse.cz>
	    H.J. Lu  <hongjiu.lu@intel.com>

	PR target/89929
	* g++.target/i386/mv28.C: New test.
	* gcc.target/i386/mvc14.c: Likewise.
	* g++.target/i386/pr57362.C: Updated.

From-SVN: r270578
parent 9125dc32
2019-04-25 H.J. Lu <hongjiu.lu@intel.com>
PR target/89929
* config/i386/i386.c (feature_priority): Moved to file scope.
(processor_features): Likewise.
(processor_model): Likewise.
(_arch_names_table): Likewise.
(arch_names_table): Likewise.
(_feature_list): Removed.
(feature_list): Likewise.
(_isa_names_table): Moved to file scope. Add priority.
(isa_names_table): Likewise.
(get_builtin_code_for_version): Replace feature_list with
isa_names_table. Update error message for P_ZERO priority.
2019-04-25 Richard Biener <rguenther@suse.de> 2019-04-25 Richard Biener <rguenther@suse.de>
* tree-pass.h (make_pass_phi_only_cprop): Remove. * tree-pass.h (make_pass_phi_only_cprop): Remove.
......
2019-04-25 Martin Liska <mliska@suse.cz>
H.J. Lu <hongjiu.lu@intel.com>
PR target/89929
* g++.target/i386/mv28.C: New test.
* gcc.target/i386/mvc14.c: Likewise.
* g++.target/i386/pr57362.C: Updated.
2019-04-24 Jeff Law <law@redhat.com> 2019-04-24 Jeff Law <law@redhat.com>
PR tree-optimization/90037 PR tree-optimization/90037
......
/* { dg-do compile} */
/* { dg-require-ifunc "" } */
void __attribute__ ((target("avx512vl"))) foo () {} /* { dg-error "ISA '\[^\n\r\]*' is not supported in 'target' attribute, use 'arch=' syntax" } */
void __attribute__ ((target("avx512bw"))) foo () {} /* { dg-error "ISA '\[^\n\r\]*' is not supported in 'target' attribute, use 'arch=' syntax" } */
void __attribute__ ((target("avx512dq"))) foo () {} /* { dg-error "ISA '\[^\n\r\]*' is not supported in 'target' attribute, use 'arch=' syntax" } */
void __attribute__ ((target("avx512cd"))) foo () {} /* { dg-error "ISA '\[^\n\r\]*' is not supported in 'target' attribute, use 'arch=' syntax" } */
void __attribute__ ((target("avx512er"))) foo () {} /* { dg-error "ISA '\[^\n\r\]*' is not supported in 'target' attribute, use 'arch=' syntax" } */
void __attribute__ ((target("avx512pf"))) foo () {} /* { dg-error "ISA '\[^\n\r\]*' is not supported in 'target' attribute, use 'arch=' syntax" } */
void __attribute__ ((target("avx512vbmi"))) foo () {} /* { dg-error "ISA '\[^\n\r\]*' is not supported in 'target' attribute, use 'arch=' syntax" } */
void __attribute__ ((target("avx512ifma"))) foo () {} /* { dg-error "ISA '\[^\n\r\]*' is not supported in 'target' attribute, use 'arch=' syntax" } */
void __attribute__ ((target("avx5124vnniw"))) foo () {} /* { dg-error "ISA '\[^\n\r\]*' is not supported in 'target' attribute, use 'arch=' syntax" } */
void __attribute__ ((target("avx5124fmaps"))) foo () {} /* { dg-error "ISA '\[^\n\r\]*' is not supported in 'target' attribute, use 'arch=' syntax" } */
void __attribute__ ((target("avx512vpopcntdq"))) foo () {} /* { dg-error "ISA '\[^\n\r\]*' is not supported in 'target' attribute, use 'arch=' syntax" } */
void __attribute__ ((target("avx512vbmi2"))) foo () {} /* { dg-error "ISA '\[^\n\r\]*' is not supported in 'target' attribute, use 'arch=' syntax" } */
void __attribute__ ((target("gfni"))) foo () {} /* { dg-error "ISA '\[^\n\r\]*' is not supported in 'target' attribute, use 'arch=' syntax" } */
void __attribute__ ((target("vpclmulqdq"))) foo () {} /* { dg-error "ISA '\[^\n\r\]*' is not supported in 'target' attribute, use 'arch=' syntax" } */
void __attribute__ ((target("avx512vnni"))) foo () {} /* { dg-error "ISA '\[^\n\r\]*' is not supported in 'target' attribute, use 'arch=' syntax" } */
void __attribute__ ((target("avx512bitalg"))) foo () {} /* { dg-error "ISA '\[^\n\r\]*' is not supported in 'target' attribute, use 'arch=' syntax" } */
void __attribute__ ((target("default"))) foo () {}
int main()
{
foo ();
return 0;
}
...@@ -199,4 +199,4 @@ int foo(void) { return 1; } ...@@ -199,4 +199,4 @@ int foo(void) { return 1; }
/* { dg-prune-output "attribute.* is unknown" } */ /* { dg-prune-output "attribute.* is unknown" } */
/* { dg-prune-output "missing 'target' attribute*" } */ /* { dg-prune-output "missing 'target' attribute*" } */
/* { dg-prune-output "redefinition of 'int foo" } */ /* { dg-prune-output "redefinition of 'int foo" } */
/* { dg-prune-output "no dispatcher found for" } */ /* { dg-prune-output "ISA '.*' is not supported in 'target' attribute" } */
/* { dg-do compile } */
/* { dg-require-ifunc "" } */
__attribute__((target_clones("avx512vl", "avx512bw", "avx512dq",
"avx512cd", "avx512er", "avx512pf", "avx512vbmi",
"avx512ifma", "avx5124vnniw", "avx5124fmaps",
"avx512vpopcntdq", "avx512vbmi2", "gfni",
"vpclmulqdq", "avx512vnni", "avx512bitalg",
"default")))
int foo (); /* { dg-error "ISA '\[^\n\r\]*' is not supported in 'target' attribute, use 'arch=' syntax" } */
int
bar ()
{
return foo();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment