[Bug tree-optimization/87657] [9 Regression] SLP ICE in libgfortran matmul_i2_vanilla

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Oct 19 12:19:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87657

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Not that word_mode vectorization costing in the backend is in any way
correct...

diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 9a5b54978a9..f542a1b494f 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -45169,9 +45163,8 @@ ix86_builtin_vectorization_cost (enum
vect_cost_for_stmt type_of_cost,

       case vec_construct:
        {
-         gcc_assert (VECTOR_MODE_P (mode));
          /* N element inserts into SSE vectors.  */
-         int cost = GET_MODE_NUNITS (mode) * ix86_cost->sse_op;
+         int cost = TYPE_VECTOR_SUBPARTS (vectype) * ix86_cost->sse_op;
          /* One vinserti128 for combining two SSE vectors for AVX256.  */
          if (GET_MODE_BITSIZE (mode) == 256)
            cost += ix86_vec_cost (mode, ix86_cost->addss);


More information about the Gcc-bugs mailing list