Commit f92d1522 by Robert Suchanek Committed by Robert Suchanek

[MIPS] Add MSA tests

gcc/testsuite/ChangeLog:

	* gcc.dg/vect/slp-26.c: Check if vectorized for MIPS MSA.
	* gcc.dg/vect/tree-vect.h (check_vect): Check for MIPS SIMD support.
	* gcc.target/mips/mips.exp: Add support for -mmsa.  Imply -mno-mips16
	for -mmsa.
	* gcc.target/mips/msa.c: New test.
	* gcc.target/mips/msa-builtins.c: Likewise.
	* lib/target-supports.exp (check_mips_msa_hw_available): New.
	(check_effective_target_mips_msa_runtime): Likewise.
	(check_effective_target_mips_msa): Likewise.
	(add_options_for_mips_msa): Likewise.
	(check_effective_target_vect_int): Return TRUE for MIPS MSA.
	(check_effective_target_vect_intfloat_cvt): Likewise.
	(check_effective_target_vect_uintfloat_cvt): Likewise.
	(check_effective_target_vect_floatint_cvt): Likewise.
	(check_effective_target_vect_floatuint_cvt): Likewise.
	(check_effective_target_vect_shift): ewise.
	(check_effective_target_vect_shift_char): Likewise.
	(check_effective_target_vect_long): Likewise.
	(check_effective_target_vect_float): Likewise.
	(check_effective_target_vect_double): Likewise.
	(check_effective_target_vect_long_long): Likewise.
	(check_effective_target_vect_perm): Likewise.
	(check_effective_target_vect_perm_byte): Likewise.
	(check_effective_target_vect_perm_short): Likewise.
	(check_effective_target_vect_sdot_qi): Likewise.
	(check_effective_target_vect_udot_qi): Likewise.
	(check_effective_target_vect_sdot_hi): Likewise.
	(check_effective_target_vect_udot_hi): Likewise.
	(check_effective_target_vect_pack_trunc): Likewise.
	(check_effective_target_vect_unpack): Likewise.
	(check_effective_target_vect_hw_misalign): Likewise.
	(check_effective_target_vect_condition): Likewise.
	(check_effective_target_vect_cond_mixed): Likewise.
	(check_effective_target_vect_char_mult): Likewise.
	(check_effective_target_vect_short_mult): Likewise.
	(check_effective_target_vect_int_mult): Likewise.
	(check_effective_target_vect_extract_even_odd): Likewise.
	(check_effective_target_vect_interleave): Likewise.
	(check_vect_support_and_set_flags): Check if the target supports MSA
	and append to the list of EFFECTIVE_TARGETS.

From-SVN: r241054
parent 0bfd099c
2016-10-12 Robert Suchanek <robert.suchanek@imgtec.com>
* gcc.dg/vect/slp-26.c: Check if vectorized for MIPS MSA.
* gcc.dg/vect/tree-vect.h (check_vect): Check for MIPS SIMD support.
* gcc.target/mips/mips.exp: Add support for -mmsa. Imply -mno-mips16
for -mmsa.
* gcc.target/mips/msa.c: New test.
* gcc.target/mips/msa-builtins.c: Likewise.
* lib/target-supports.exp (check_mips_msa_hw_available): New.
(check_effective_target_mips_msa_runtime): Likewise.
(check_effective_target_mips_msa): Likewise.
(add_options_for_mips_msa): Likewise.
(check_effective_target_vect_int): Return TRUE for MIPS MSA.
(check_effective_target_vect_intfloat_cvt): Likewise.
(check_effective_target_vect_uintfloat_cvt): Likewise.
(check_effective_target_vect_floatint_cvt): Likewise.
(check_effective_target_vect_floatuint_cvt): Likewise.
(check_effective_target_vect_shift): Likewise.
(check_effective_target_vect_shift_char): Likewise.
(check_effective_target_vect_long): Likewise.
(check_effective_target_vect_float): Likewise.
(check_effective_target_vect_double): Likewise.
(check_effective_target_vect_long_long): Likewise.
(check_effective_target_vect_perm): Likewise.
(check_effective_target_vect_perm_byte): Likewise.
(check_effective_target_vect_perm_short): Likewise.
(check_effective_target_vect_sdot_qi): Likewise.
(check_effective_target_vect_udot_qi): Likewise.
(check_effective_target_vect_sdot_hi): Likewise.
(check_effective_target_vect_udot_hi): Likewise.
(check_effective_target_vect_pack_trunc): Likewise.
(check_effective_target_vect_unpack): Likewise.
(check_effective_target_vect_hw_misalign): Likewise.
(check_effective_target_vect_condition): Likewise.
(check_effective_target_vect_cond_mixed): Likewise.
(check_effective_target_vect_char_mult): Likewise.
(check_effective_target_vect_short_mult): Likewise.
(check_effective_target_vect_int_mult): Likewise.
(check_effective_target_vect_extract_even_odd): Likewise.
(check_effective_target_vect_interleave): Likewise.
(check_vect_support_and_set_flags): Check if the target supports MSA
and append to the list of EFFECTIVE_TARGETS.
2016-10-12 Richard Biener <rguenther@suse.de> 2016-10-12 Richard Biener <rguenther@suse.de>
PR debug/77947 PR debug/77947
......
...@@ -46,6 +46,7 @@ int main (void) ...@@ -46,6 +46,7 @@ int main (void)
return 0; return 0;
} }
/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" } } */ /* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" { target { ! mips_msa } } } } */
/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" } } */ /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { mips_msa } } } } */
/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" { target { ! mips_msa } } } } */
/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target { mips_msa } } } } */
...@@ -70,6 +70,8 @@ check_vect (void) ...@@ -70,6 +70,8 @@ check_vect (void)
if (a != 1) if (a != 1)
exit (0); exit (0);
} }
#elif defined(__mips_msa)
asm volatile ("or.v $w0,$w0,$w0");
#endif #endif
signal (SIGILL, SIG_DFL); signal (SIGILL, SIG_DFL);
} }
...@@ -290,6 +290,7 @@ foreach option { ...@@ -290,6 +290,7 @@ foreach option {
relax-pic-calls relax-pic-calls
mcount-ra-address mcount-ra-address
odd-spreg odd-spreg
msa
} { } {
lappend mips_option_groups $option "-m(no-|)$option" lappend mips_option_groups $option "-m(no-|)$option"
} }
...@@ -820,6 +821,12 @@ proc mips-dg-init {} { ...@@ -820,6 +821,12 @@ proc mips-dg-init {} {
"-mno-synci", "-mno-synci",
#endif #endif
#ifdef __mips_msa
"-mmsa"
#else
"-mno-msa"
#endif
0 0
}; };
}] }]
...@@ -1368,6 +1375,7 @@ proc mips-dg-options { args } { ...@@ -1368,6 +1375,7 @@ proc mips-dg-options { args } {
mips_option_dependency options "-mfpxx" "-mno-paired-single" mips_option_dependency options "-mfpxx" "-mno-paired-single"
mips_option_dependency options "-msoft-float" "-mno-paired-single" mips_option_dependency options "-msoft-float" "-mno-paired-single"
mips_option_dependency options "-mno-paired-single" "-mno-mips3d" mips_option_dependency options "-mno-paired-single" "-mno-mips3d"
mips_option_dependency options "-mmsa" "-mno-mips16"
# If the test requires an unsupported option, change run tests # If the test requires an unsupported option, change run tests
# to link tests. # to link tests.
......
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