Commit 6d264876 by Richard Biener Committed by Richard Biener

re PR tree-optimization/87657 (SLP ICE in libgfortran matmul_i2_vanilla)

2018-10-19  Richard Biener  <rguenther@suse.de>

	PR target/87657
	* config/i386/i386.c (ix86_builtin_vectorization_cost): Use
	TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.

	* gcc.target/i386/pr87657.c: New testcase.

From-SVN: r265316
parent 30f7c08d
2018-10-19 Richard Biener <rguenther@suse.de>
PR target/87657
* config/i386/i386.c (ix86_builtin_vectorization_cost): Use
TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
2018-10-19 H.J. Lu <hongjiu.lu@intel.com> 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
PR target/72782 PR target/72782
...@@ -45173,9 +45173,8 @@ ix86_builtin_vectorization_cost (enum vect_cost_for_stmt type_of_cost, ...@@ -45173,9 +45173,8 @@ ix86_builtin_vectorization_cost (enum vect_cost_for_stmt type_of_cost,
case vec_construct: case vec_construct:
{ {
gcc_assert (VECTOR_MODE_P (mode));
/* N element inserts into SSE vectors. */ /* 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. */ /* One vinserti128 for combining two SSE vectors for AVX256. */
if (GET_MODE_BITSIZE (mode) == 256) if (GET_MODE_BITSIZE (mode) == 256)
cost += ix86_vec_cost (mode, ix86_cost->addss); cost += ix86_vec_cost (mode, ix86_cost->addss);
2018-10-19 Richard Biener <rguenther@suse.de>
PR target/87657
* gcc.target/i386/pr87657.c: New testcase.
2018-10-19 H.J. Lu <hongjiu.lu@intel.com> 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
PR target/72782 PR target/72782
......
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-slp-vectorize -fno-vect-cost-model -mno-sse" } */
int x;
void foo (short a, short b)
{
((short *)&x)[0] = a;
((short *)&x)[1] = b;
}
#if __SIZEOF_LONG__ == 8
long y;
void bar (short a, short b)
{
((short *)&y)[0] = a;
((short *)&y)[1] = b;
((short *)&y)[2] = a;
((short *)&y)[3] = b;
}
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment