[AArch64] Vectorize over more math.h functions.
authorJames Greenhalgh <james.greenhalgh@arm.com>
Mon, 29 Apr 2013 11:02:15 +0000 (11:02 +0000)
committerJames Greenhalgh <jgreenhalgh@gcc.gnu.org>
Mon, 29 Apr 2013 11:02:15 +0000 (11:02 +0000)
gcc/
* config/aarch64/aarch64-builtins.c
(aarch64_builtin_vectorized_function): Vectorize over ifloorf,
iceilf, lround, iroundf.

From-SVN: r198402

gcc/ChangeLog
gcc/config/aarch64/aarch64-builtins.c

index 2ee4a0c..bef76a8 100644 (file)
@@ -1,3 +1,9 @@
+2013-04-29  James Greenhalgh  <james.greenhalgh@arm.com>
+
+       * config/aarch64/aarch64-builtins.c
+       (aarch64_builtin_vectorized_function): Vectorize over ifloorf,
+       iceilf, lround, iroundf.
+
 2013-04-29  Uros Bizjak  <ubizjak@gmail.com>
 
        PR target/54349
index d2e5136..53d2c6a 100644 (file)
@@ -1245,6 +1245,7 @@ aarch64_builtin_vectorized_function (tree fndecl, tree type_out, tree type_in)
   (out_mode == N##Imode && out_n == C \
    && in_mode == N##Fmode && in_n == C)
        case BUILT_IN_LFLOOR:
+       case BUILT_IN_IFLOORF:
          {
            tree new_tree = NULL_TREE;
            if (AARCH64_CHECK_BUILTIN_MODE (2, D))
@@ -1259,6 +1260,7 @@ aarch64_builtin_vectorized_function (tree fndecl, tree type_out, tree type_in)
            return new_tree;
          }
        case BUILT_IN_LCEIL:
+       case BUILT_IN_ICEILF:
          {
            tree new_tree = NULL_TREE;
            if (AARCH64_CHECK_BUILTIN_MODE (2, D))
@@ -1272,6 +1274,22 @@ aarch64_builtin_vectorized_function (tree fndecl, tree type_out, tree type_in)
                aarch64_builtin_decls[AARCH64_SIMD_BUILTIN_lceilv2sfv2si];
            return new_tree;
          }
+       case BUILT_IN_LROUND:
+       case BUILT_IN_IROUNDF:
+         {
+           tree new_tree = NULL_TREE;
+           if (AARCH64_CHECK_BUILTIN_MODE (2, D))
+             new_tree =
+               aarch64_builtin_decls[AARCH64_SIMD_BUILTIN_lroundv2dfv2di];
+           else if (AARCH64_CHECK_BUILTIN_MODE (4, S))
+             new_tree =
+               aarch64_builtin_decls[AARCH64_SIMD_BUILTIN_lroundv4sfv4si];
+           else if (AARCH64_CHECK_BUILTIN_MODE (2, S))
+             new_tree =
+               aarch64_builtin_decls[AARCH64_SIMD_BUILTIN_lroundv2sfv2si];
+           return new_tree;
+         }
+
        default:
          return NULL_TREE;
       }