From 885cc3ea9e4ae1f95589a33eb811c4bebb0dc487 Mon Sep 17 00:00:00 2001 From: ktkachov Date: Tue, 19 Jan 2016 14:30:23 +0000 Subject: [PATCH] [ARM] PR target/69135: Mark ARMv8 vcvt instructions as unconditional PR target/69135 * config/arm/vfp.md (lsi2): Set "conds" attribute to unconditional. Remove %? from output template. * gcc.target/arm/pr69135_1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232566 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 +++++ gcc/config/arm/vfp.md | 3 ++- gcc/testsuite/ChangeLog | 5 ++++ gcc/testsuite/gcc.target/arm/pr69135_1.c | 44 ++++++++++++++++++++++++++++++++ 4 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.target/arm/pr69135_1.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index de730d43807..bffbedf2591 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-01-19 Kyrylo Tkachov + + PR target/69135 + * config/arm/vfp.md (lsi2): Set "conds" + attribute to unconditional. Remove %? from output template. + 2015-01-19 Wilco Dijkstra Jiong Wang diff --git a/gcc/config/arm/vfp.md b/gcc/config/arm/vfp.md index cf3b202d256..ac5f3b862b5 100644 --- a/gcc/config/arm/vfp.md +++ b/gcc/config/arm/vfp.md @@ -1334,8 +1334,9 @@ [(match_operand:SDF 1 "register_operand" "")] VCVT)))] "TARGET_HARD_FLOAT && TARGET_FPU_ARMV8 " - "vcvt%?.32.\\t%0, %1" + "vcvt.32.\\t%0, %1" [(set_attr "predicable" "no") + (set_attr "conds" "unconditional") (set_attr "type" "f_cvtf2i")] ) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 057dc1e9e88..f360afd5456 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-01-19 Kyrylo Tkachov + + PR target/69135 + * gcc.target/arm/pr69135_1.c: New test. + 2015-01-19 Wilco Dijkstra * gcc.target/aarch64/ccmp_1.c: Add new tests. diff --git a/gcc/testsuite/gcc.target/arm/pr69135_1.c b/gcc/testsuite/gcc.target/arm/pr69135_1.c new file mode 100644 index 00000000000..6fb9e0681ba --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/pr69135_1.c @@ -0,0 +1,44 @@ +/* { dg-do assemble } */ +/* { dg-require-effective-target arm_v8_vfp_ok } */ +/* { dg-require-effective-target arm_arch_v8a_ok } */ +/* { dg-options "-O2 -ffast-math" } */ +/* { dg-add-options arm_v8_vfp } */ +/* { dg-add-options arm_arch_v8a } */ + +int global; + +void +lceil_float (float x, int b) +{ + if (b) global = __builtin_lceilf (x); +} + +void +lceil_double (double x, int b) +{ + if (b) global = __builtin_lceil (x); +} + +void +lfloor_float (float x, int b) +{ + if (b) global = __builtin_lfloorf (x); +} + +void +lfloor_double (double x, int b) +{ + if (b) global = __builtin_lfloor (x); +} + +void +lround_float (float x, int b) +{ + if (b) global = __builtin_lroundf (x); +} + +void +lround_double (double x, int b) +{ + if (b) global = __builtin_lround (x); +} -- 2.11.4.GIT