Commit adcef07c by Kyrylo Tkachov Committed by Kyrylo Tkachov

target-supports.exp (add_options_for_arm_v8_neon): Add -march=armv8-a when we use v8 NEON.

2013-04-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* lib/target-supports.exp (add_options_for_arm_v8_neon):
	Add -march=armv8-a when we use v8 NEON.
	(check_effective_target_vect_call_btruncf): Remove arm-*-*-*.
	(check_effective_target_vect_call_ceilf): Likewise.
	(check_effective_target_vect_call_floorf): Likewise.
	(check_effective_target_vect_call_roundf): Likewise.
	(check_vect_support_and_set_flags): Remove check for arm_v8_neon.
	* gcc.target/arm/vect-rounding-btruncf.c: New testcase.
	* gcc.target/arm/vect-rounding-ceilf.c: Likewise.
	* gcc.target/arm/vect-rounding-floorf.c: Likewise.
	* gcc.target/arm/vect-rounding-roundf.c: Likewise.

From-SVN: r197523
parent 3f3bf1a8
2013-04-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* lib/target-supports.exp (add_options_for_arm_v8_neon):
Add -march=armv8-a when we use v8 NEON.
(check_effective_target_vect_call_btruncf): Remove arm-*-*-*.
(check_effective_target_vect_call_ceilf): Likewise.
(check_effective_target_vect_call_floorf): Likewise.
(check_effective_target_vect_call_roundf): Likewise.
(check_vect_support_and_set_flags): Remove check for arm_v8_neon.
* gcc.target/arm/vect-rounding-btruncf.c: New testcase.
* gcc.target/arm/vect-rounding-ceilf.c: Likewise.
* gcc.target/arm/vect-rounding-floorf.c: Likewise.
* gcc.target/arm/vect-rounding-roundf.c: Likewise.
2013-04-05 David Edelsohn <dje.gcc@gmail.com>
* gcc.target/powerpc/sd-vsx.c: Skip on AIX.
......
/* { dg-do compile } */
/* { dg-require-effective-target arm_v8_neon_ok } */
/* { dg-options "-O2 -ffast-math -ftree-vectorize" } */
/* { dg-add-options arm_v8_neon } */
#define N 32
void
foo (float *output, float *input)
{
int i = 0;
/* Vectorizable. */
for (i = 0; i < N; i++)
output[i] = __builtin_truncf (input[i]);
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_call_btruncf } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
/* { dg-do compile } */
/* { dg-require-effective-target arm_v8_neon_ok } */
/* { dg-options "-O2 -ffast-math -ftree-vectorize" } */
/* { dg-add-options arm_v8_neon } */
#define N 32
void
foo (float *output, float *input)
{
int i = 0;
/* Vectorizable. */
for (i = 0; i < N; i++)
output[i] = __builtin_ceilf (input[i]);
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_call_ceilf } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
/* { dg-do compile } */
/* { dg-require-effective-target arm_v8_neon_ok } */
/* { dg-options "-O2 -ffast-math -ftree-vectorize" } */
/* { dg-add-options arm_v8_neon } */
#define N 32
void
foo (float *output, float *input)
{
int i = 0;
/* Vectorizable. */
for (i = 0; i < N; i++)
output[i] = __builtin_floorf (input[i]);
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_call_floorf } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
/* { dg-do compile } */
/* { dg-require-effective-target arm_v8_neon_ok } */
/* { dg-options "-O2 -ffast-math -ftree-vectorize" } */
/* { dg-add-options arm_v8_neon } */
#define N 32
void
foo (float *output, float *input)
{
int i = 0;
/* Vectorizable. */
for (i = 0; i < N; i++)
output[i] = __builtin_roundf (input[i]);
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_call_roundf } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
......@@ -2211,7 +2211,7 @@ proc add_options_for_arm_v8_neon { flags } {
return "$flags"
}
global et_arm_v8_neon_flags
return "$flags $et_arm_v8_neon_flags"
return "$flags $et_arm_v8_neon_flags -march=armv8-a"
}
# Add the options needed for NEON. We need either -mfloat-abi=softfp
......@@ -4082,9 +4082,7 @@ proc check_effective_target_vect_call_btruncf { } {
verbose "check_effective_target_vect_call_btruncf: using cached result" 2
} else {
set et_vect_call_btruncf_saved 0
if { [istarget aarch64*-*-*]
|| ([istarget arm*-*-*]
&& [check_effective_target_arm_v8_neon_ok]) } {
if { [istarget aarch64*-*-*] } {
set et_vect_call_btruncf_saved 1
}
}
......@@ -4120,9 +4118,7 @@ proc check_effective_target_vect_call_ceilf { } {
verbose "check_effective_target_vect_call_ceilf: using cached result" 2
} else {
set et_vect_call_ceilf_saved 0
if { [istarget aarch64*-*-*]
|| ([istarget arm*-*-*]
&& [check_effective_target_arm_v8_neon_ok]) } {
if { [istarget aarch64*-*-*] } {
set et_vect_call_ceilf_saved 1
}
}
......@@ -4158,9 +4154,7 @@ proc check_effective_target_vect_call_floorf { } {
verbose "check_effective_target_vect_call_floorf: using cached result" 2
} else {
set et_vect_call_floorf_saved 0
if { [istarget aarch64*-*-*]
|| ([istarget arm*-*-*]
&& [check_effective_target_arm_v8_neon_ok]) } {
if { [istarget aarch64*-*-*] } {
set et_vect_call_floorf_saved 1
}
}
......@@ -4268,9 +4262,7 @@ proc check_effective_target_vect_call_roundf { } {
verbose "check_effective_target_vect_call_roundf: using cached result" 2
} else {
set et_vect_call_roundf_saved 0
if { [istarget aarch64*-*-*]
|| ([istarget arm*-*-*]
&& [check_effective_target_arm_v8_neon_ok]) } {
if { [istarget aarch64*-*-*] } {
set et_vect_call_roundf_saved 1
}
}
......@@ -5172,14 +5164,6 @@ proc check_vect_support_and_set_flags { } {
}
} elseif [istarget ia64-*-*] {
set dg-do-what-default run
} elseif [is-effective-target arm_v8_neon_ok] {
eval lappend DEFAULT_VECTCFLAGS [add_options_for_arm_v8_neon ""]
lappend DEFAULT_VECTCFLAGS "-ffast-math"
if [is-effective-target arm_v8_neon_hw] {
set dg-do-what-default run
} else {
set dg-do-what-default compile
}
} elseif [is-effective-target arm_neon_ok] {
eval lappend DEFAULT_VECTCFLAGS [add_options_for_arm_neon ""]
# NEON does not support denormals, so is not used for vectorization by
......
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