Commit b29502e7 by Richard Biener Committed by Richard Biener

re PR tree-optimization/85934 (ICE: verify_gimple failed (error: type mismatch…

re PR tree-optimization/85934 (ICE: verify_gimple failed (error: type mismatch in vector pack expression))

2018-05-28  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/85934
	* tree-vect-generic.c (expand_vector_operations_1): Hoist
	vector boolean check before scalar optimization.

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

From-SVN: r260847
parent 533aa46a
2018-05-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/85934
* gcc.target/i386/pr85934.c: New testcase.
2018-05-28 Eric Botcazou <ebotcazou@adacore.com> 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/renaming12.adb, gnat.dg/renaming12.ads: New testcase. * gnat.dg/renaming12.adb, gnat.dg/renaming12.ads: New testcase.
......
/* { dg-do compile } */
/* { dg-options "-O -ftree-loop-vectorize -mavx512vbmi" } */
int uf;
int
l7 (int wk, int sv)
{
while (sv < 1)
{
int me;
for (me = 0; me < 64; ++me)
wk += !!((unsigned char) sv) && (!!uf == !!me);
++sv;
}
return wk;
}
...@@ -1612,6 +1612,12 @@ expand_vector_operations_1 (gimple_stmt_iterator *gsi) ...@@ -1612,6 +1612,12 @@ expand_vector_operations_1 (gimple_stmt_iterator *gsi)
if (!VECTOR_TYPE_P (type) if (!VECTOR_TYPE_P (type)
|| !VECTOR_TYPE_P (TREE_TYPE (rhs1))) || !VECTOR_TYPE_P (TREE_TYPE (rhs1)))
return; return;
/* A scalar operation pretending to be a vector one. */
if (VECTOR_BOOLEAN_TYPE_P (type)
&& !VECTOR_MODE_P (TYPE_MODE (type))
&& TYPE_MODE (type) != BLKmode)
return;
/* If the vector operation is operating on all same vector elements /* If the vector operation is operating on all same vector elements
implement it with a scalar operation and a splat if the target implement it with a scalar operation and a splat if the target
...@@ -1638,12 +1644,6 @@ expand_vector_operations_1 (gimple_stmt_iterator *gsi) ...@@ -1638,12 +1644,6 @@ expand_vector_operations_1 (gimple_stmt_iterator *gsi)
return; return;
} }
} }
/* A scalar operation pretending to be a vector one. */
if (VECTOR_BOOLEAN_TYPE_P (type)
&& !VECTOR_MODE_P (TYPE_MODE (type))
&& TYPE_MODE (type) != BLKmode)
return;
if (CONVERT_EXPR_CODE_P (code) if (CONVERT_EXPR_CODE_P (code)
|| code == FLOAT_EXPR || code == FLOAT_EXPR
......
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