summaryrefslogtreecommitdiff
path: root/gcc/testsuite/lib
diff options
context:
space:
mode:
authorjgreenhalgh <jgreenhalgh@138bc75d-0d04-0410-961f-82ee72b054a4>2012-12-05 10:34:31 +0000
committerjgreenhalgh <jgreenhalgh@138bc75d-0d04-0410-961f-82ee72b054a4>2012-12-05 10:34:31 +0000
commitba640418bb6df4412d84551138ae37fe55f71e0d (patch)
tree7add6443c2ec20e9136161c82953fe3d054b8ec3 /gcc/testsuite/lib
parentd32ceaf380038456c115fc3de41bd851780f74ff (diff)
downloadgcc-ba640418bb6df4412d84551138ae37fe55f71e0d.tar.gz
[AARCH64] Add support for vectorizable standard math patterns.
gcc/ * config/aarch64/aarch64-builtins.c (aarch64_builtin_vectorized_function): New. * config/aarch64/aarch64-protos.h (aarch64_builtin_vectorized_function): Declare. * config/aarch64/aarch64-simd-builtins.def (frintz, frintp): Add. (frintm, frinti, frintx, frinta, fcvtzs, fcvtzu): Likewise. (fcvtas, fcvtau, fcvtps, fcvtpu, fcvtms, fcvtmu): Likewise. * config/aarch64/aarch64-simd.md (aarch64_frint_<frint_suffix><mode>): New. (<frint_pattern><mode>2): Likewise. (aarch64_fcvt<frint_suffix><su><mode>): Likewise. (l<fcvt_pattern><su_optab><fcvt_target><VDQF:mode>2): Likewise. * config/aarch64/aarch64.c (TARGET_VECTORIZE_BUILTINS): Define. (TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION): Likewise. * config/aarch64/aarch64.md (btrunc<mode>2, ceil<mode>2, floor<mode>2) (round<mode>2, rint<mode>2, nearbyint<mode>2): Consolidate as... (<frint_pattern><mode>2): ...this. (lceil<su_optab><mode><mode>2, lfloor<su_optab><mode><mode>2) (lround<su_optab><mode><mode>2) (lrint<su_optab><mode><mode>2): Consolidate as... (l<fcvt_pattern><su_optab><GPF:mode><GPI:mode>2): ... this. * config/aarch64/iterators.md (fcvt_target): New. (FCVT_TARGET): Likewise. (FRINT): Likewise. (FCVT): Likewise. (frint_pattern): Likewise. (frint_suffix): Likewise. (fcvt_pattern): Likewise. gcc/testsuite/ * gcc.dg/vect/vect-rounding-btrunc.c: New test. * gcc.dg/vect/vect-rounding-btruncf.c: Likewise. * gcc.dg/vect/vect-rounding-ceil.c: Likewise. * gcc.dg/vect/vect-rounding-ceilf.c: Likewise. * gcc.dg/vect/vect-rounding-floor.c: Likewise. * gcc.dg/vect/vect-rounding-floorf.c: Likewise. * gcc.dg/vect/vect-rounding-lceil.c: Likewise. * gcc.dg/vect/vect-rounding-lfloor.c: Likewise. * gcc.dg/vect/vect-rounding-nearbyint.c: Likewise. * gcc.dg/vect/vect-rounding-nearbyintf.c: Likewise. * gcc.dg/vect/vect-rounding-round.c: Likewise. * gcc.dg/vect/vect-rounding-roundf.c: Likewise. * target-supports.exp (check_effective_target_vect_call_btrunc): New. (check_effective_target_vect_call_btruncf): Likewise. (check_effective_target_vect_call_ceil): Likewise. (check_effective_target_vect_call_ceilf): Likewise. (check_effective_target_vect_call_floor): Likewise. (check_effective_target_vect_call_floorf): Likewise. (check_effective_target_vect_call_lceil): Likewise. (check_effective_target_vect_call_lfloor): Likewise. (check_effective_target_vect_call_nearbyint): Likewise. (check_effective_target_vect_call_nearbyintf): Likewise. (check_effective_target_vect_call_round): Likewise. (check_effective_target_vect_call_roundf): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194197 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/lib')
-rw-r--r--gcc/testsuite/lib/target-supports.exp216
1 files changed, 216 insertions, 0 deletions
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 5935346cc65..59d854f1d6c 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -3925,6 +3925,222 @@ proc check_effective_target_vect_call_lrint { } {
return $et_vect_call_lrint
}
+# Return 1 if the target supports vector btrunc calls.
+
+proc check_effective_target_vect_call_btrunc { } {
+ global et_vect_call_btrunc_saved
+
+ if [info exists et_vect_call_btrunc_saved] {
+ verbose "check_effective_target_vect_call_btrunc: using cached result" 2
+ } else {
+ set et_vect_call_btrunc_saved 0
+ if { [istarget aarch64*-*-*] } {
+ set et_vect_call_btrunc_saved 1
+ }
+ }
+
+ verbose "check_effective_target_vect_call_btrunc: returning $et_vect_call_btrunc_saved" 2
+ return $et_vect_call_btrunc_saved
+}
+
+# Return 1 if the target supports vector btruncf calls.
+
+proc check_effective_target_vect_call_btruncf { } {
+ global et_vect_call_btruncf_saved
+
+ if [info exists et_vect_call_btruncf_saved] {
+ verbose "check_effective_target_vect_call_btruncf: using cached result" 2
+ } else {
+ set et_vect_call_btruncf_saved 0
+ if { [istarget aarch64*-*-*] } {
+ set et_vect_call_btruncf_saved 1
+ }
+ }
+
+ verbose "check_effective_target_vect_call_btruncf: returning $et_vect_call_btruncf_saved" 2
+ return $et_vect_call_btruncf_saved
+}
+
+# Return 1 if the target supports vector ceil calls.
+
+proc check_effective_target_vect_call_ceil { } {
+ global et_vect_call_ceil_saved
+
+ if [info exists et_vect_call_ceil_saved] {
+ verbose "check_effective_target_vect_call_ceil: using cached result" 2
+ } else {
+ set et_vect_call_ceil_saved 0
+ if { [istarget aarch64*-*-*] } {
+ set et_vect_call_ceil_saved 1
+ }
+ }
+
+ verbose "check_effective_target_vect_call_ceil: returning $et_vect_call_ceil_saved" 2
+ return $et_vect_call_ceil_saved
+}
+
+# Return 1 if the target supports vector ceilf calls.
+
+proc check_effective_target_vect_call_ceilf { } {
+ global et_vect_call_ceilf_saved
+
+ if [info exists et_vect_call_ceilf_saved] {
+ verbose "check_effective_target_vect_call_ceilf: using cached result" 2
+ } else {
+ set et_vect_call_ceilf_saved 0
+ if { [istarget aarch64*-*-*] } {
+ set et_vect_call_ceilf_saved 1
+ }
+ }
+
+ verbose "check_effective_target_vect_call_ceilf: returning $et_vect_call_ceilf_saved" 2
+ return $et_vect_call_ceilf_saved
+}
+
+# Return 1 if the target supports vector floor calls.
+
+proc check_effective_target_vect_call_floor { } {
+ global et_vect_call_floor_saved
+
+ if [info exists et_vect_call_floor_saved] {
+ verbose "check_effective_target_vect_call_floor: using cached result" 2
+ } else {
+ set et_vect_call_floor_saved 0
+ if { [istarget aarch64*-*-*] } {
+ set et_vect_call_floor_saved 1
+ }
+ }
+
+ verbose "check_effective_target_vect_call_floor: returning $et_vect_call_floor_saved" 2
+ return $et_vect_call_floor_saved
+}
+
+# Return 1 if the target supports vector floorf calls.
+
+proc check_effective_target_vect_call_floorf { } {
+ global et_vect_call_floorf_saved
+
+ if [info exists et_vect_call_floorf_saved] {
+ verbose "check_effective_target_vect_call_floorf: using cached result" 2
+ } else {
+ set et_vect_call_floorf_saved 0
+ if { [istarget aarch64*-*-*] } {
+ set et_vect_call_floorf_saved 1
+ }
+ }
+
+ verbose "check_effective_target_vect_call_floorf: returning $et_vect_call_floorf_saved" 2
+ return $et_vect_call_floorf_saved
+}
+
+# Return 1 if the target supports vector lceil calls.
+
+proc check_effective_target_vect_call_lceil { } {
+ global et_vect_call_lceil_saved
+
+ if [info exists et_vect_call_lceil_saved] {
+ verbose "check_effective_target_vect_call_lceil: using cached result" 2
+ } else {
+ set et_vect_call_lceil_saved 0
+ if { [istarget aarch64*-*-*] } {
+ set et_vect_call_lceil_saved 1
+ }
+ }
+
+ verbose "check_effective_target_vect_call_lceil: returning $et_vect_call_lceil_saved" 2
+ return $et_vect_call_lceil_saved
+}
+
+# Return 1 if the target supports vector lfloor calls.
+
+proc check_effective_target_vect_call_lfloor { } {
+ global et_vect_call_lfloor_saved
+
+ if [info exists et_vect_call_lfloor_saved] {
+ verbose "check_effective_target_vect_call_lfloor: using cached result" 2
+ } else {
+ set et_vect_call_lfloor_saved 0
+ if { [istarget aarch64*-*-*] } {
+ set et_vect_call_lfloor_saved 1
+ }
+ }
+
+ verbose "check_effective_target_vect_call_lfloor: returning $et_vect_call_lfloor_saved" 2
+ return $et_vect_call_lfloor_saved
+}
+
+# Return 1 if the target supports vector nearbyint calls.
+
+proc check_effective_target_vect_call_nearbyint { } {
+ global et_vect_call_nearbyint_saved
+
+ if [info exists et_vect_call_nearbyint_saved] {
+ verbose "check_effective_target_vect_call_nearbyint: using cached result" 2
+ } else {
+ set et_vect_call_nearbyint_saved 0
+ if { [istarget aarch64*-*-*] } {
+ set et_vect_call_nearbyint_saved 1
+ }
+ }
+
+ verbose "check_effective_target_vect_call_nearbyint: returning $et_vect_call_nearbyint_saved" 2
+ return $et_vect_call_nearbyint_saved
+}
+
+# Return 1 if the target supports vector nearbyintf calls.
+
+proc check_effective_target_vect_call_nearbyintf { } {
+ global et_vect_call_nearbyintf_saved
+
+ if [info exists et_vect_call_nearbyintf_saved] {
+ verbose "check_effective_target_vect_call_nearbyintf: using cached result" 2
+ } else {
+ set et_vect_call_nearbyintf_saved 0
+ if { [istarget aarch64*-*-*] } {
+ set et_vect_call_nearbyintf_saved 1
+ }
+ }
+
+ verbose "check_effective_target_vect_call_nearbyintf: returning $et_vect_call_nearbyintf_saved" 2
+ return $et_vect_call_nearbyintf_saved
+}
+
+# Return 1 if the target supports vector round calls.
+
+proc check_effective_target_vect_call_round { } {
+ global et_vect_call_round_saved
+
+ if [info exists et_vect_call_round_saved] {
+ verbose "check_effective_target_vect_call_round: using cached result" 2
+ } else {
+ set et_vect_call_round_saved 0
+ if { [istarget aarch64*-*-*] } {
+ set et_vect_call_round_saved 1
+ }
+ }
+
+ verbose "check_effective_target_vect_call_round: returning $et_vect_call_round_saved" 2
+ return $et_vect_call_round_saved
+}
+
+# Return 1 if the target supports vector roundf calls.
+
+proc check_effective_target_vect_call_roundf { } {
+ global et_vect_call_roundf_saved
+
+ if [info exists et_vect_call_roundf_saved] {
+ verbose "check_effective_target_vect_call_roundf: using cached result" 2
+ } else {
+ set et_vect_call_roundf_saved 0
+ if { [istarget aarch64*-*-*] } {
+ set et_vect_call_roundf_saved 1
+ }
+ }
+
+ verbose "check_effective_target_vect_call_roundf: returning $et_vect_call_roundf_saved" 2
+ return $et_vect_call_roundf_saved
+}
+
# Return 1 if the target supports section-anchors
proc check_effective_target_section_anchors { } {