re PR target/86557 (missed vectorization with std::vector compared to icc 18)
authorRichard Biener <rguenther@suse.de>
Wed, 18 Jul 2018 12:57:15 +0000 (12:57 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 18 Jul 2018 12:57:15 +0000 (12:57 +0000)
2018-07-18  Richard Biener  <rguenther@suse.de>

PR tree-optimization/86557
* tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
EXACT_DIV_EXPR.

From-SVN: r262854

gcc/ChangeLog
gcc/tree-vect-patterns.c

index 9ed75cd6d788a5e3d225e2d99aeb8929e9efa113..bf1942cdff1e22c37db7bf4b44a53749d3347e8a 100644 (file)
@@ -1,3 +1,9 @@
+2018-07-18  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/86557
+       * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
+       EXACT_DIV_EXPR.
+
 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
 
        * config/s390/s390.c (s390_function_profiler): Generate CFI.
index 4c22afd2b5fa1885d9163a6e752e991dec0206f9..0f63ccf87bb98b316934718eafa800378d50046b 100644 (file)
@@ -2684,6 +2684,7 @@ vect_recog_divmod_pattern (stmt_vec_info stmt_vinfo, tree *type_out)
   switch (rhs_code)
     {
     case TRUNC_DIV_EXPR:
+    case EXACT_DIV_EXPR:
     case TRUNC_MOD_EXPR:
       break;
     default:
@@ -2730,7 +2731,8 @@ vect_recog_divmod_pattern (stmt_vec_info stmt_vinfo, tree *type_out)
 
       cond = build2 (LT_EXPR, boolean_type_node, oprnd0,
                     build_int_cst (itype, 0));
-      if (rhs_code == TRUNC_DIV_EXPR)
+      if (rhs_code == TRUNC_DIV_EXPR
+         || rhs_code == EXACT_DIV_EXPR)
        {
          tree var = vect_recog_temp_ssa_var (itype, NULL);
          tree shift;