public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix up my recent change to vect_get_constant_vectors (PR tree-optimization/69207)
@ 2016-01-11 17:13 Jakub Jelinek
  2016-01-12 14:21 ` Ilya Enkovich
  0 siblings, 1 reply; 26+ messages in thread
From: Jakub Jelinek @ 2016-01-11 17:13 UTC (permalink / raw)
  To: Richard Biener; +Cc: gcc-patches

Hi!

Based on discussions on IRC, I'm submitting following fix for a regression
on aarch64 - partial reversion (the case where VCE works too, just I thought
using NOP_EXPR would be nicer) and change in the assert - op better be
some integral value if converting it to VECTOR_BOOLEAN_TYPE_P's element
type.

Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

2016-01-11  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/69207
	* tree-vect-slp.c (vect_get_constant_vectors): For
	VECTOR_BOOLEAN_TYPE_P, assert op has integral type instead of
	fold_convertible_p to vector_type's element type, and always
	use VCE for non-VECTOR_BOOLEAN_TYPE_P.

--- gcc/tree-vect-slp.c.jj	2016-01-08 21:45:57.000000000 +0100
+++ gcc/tree-vect-slp.c	2016-01-11 12:07:19.633366712 +0100
@@ -2999,12 +2999,9 @@ vect_get_constant_vectors (tree op, slp_
 		  gimple *init_stmt;
 		  if (VECTOR_BOOLEAN_TYPE_P (vector_type))
 		    {
-		      gcc_assert (fold_convertible_p (TREE_TYPE (vector_type),
-						      op));
+		      gcc_assert (INTEGRAL_TYPE_P (TREE_TYPE (op)));
 		      init_stmt = gimple_build_assign (new_temp, NOP_EXPR, op);
 		    }
-		  else if (fold_convertible_p (TREE_TYPE (vector_type), op))
-		    init_stmt = gimple_build_assign (new_temp, NOP_EXPR, op);
 		  else
 		    {
 		      op = build1 (VIEW_CONVERT_EXPR, TREE_TYPE (vector_type),

	Jakub

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2016-06-21 13:46 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-11 17:13 [PATCH] Fix up my recent change to vect_get_constant_vectors (PR tree-optimization/69207) Jakub Jelinek
2016-01-12 14:21 ` Ilya Enkovich
2016-06-03 17:33   ` [PATCH] Fix SLP wrong-code with VECTOR_BOOLEAN_TYPE_P (PR tree-optimization/71259) Jakub Jelinek
2016-06-06  8:06     ` Richard Biener
2016-06-06 17:44       ` Jakub Jelinek
2016-06-07  7:13         ` Richard Biener
2016-06-07  9:23     ` Christophe Lyon
2016-06-07  9:28       ` Jakub Jelinek
2016-06-07  9:36         ` Ramana Radhakrishnan
2016-06-07  9:42           ` Jakub Jelinek
2016-06-07 12:43             ` Christophe Lyon
2016-06-07 12:47               ` Jakub Jelinek
2016-06-08  9:28         ` Christophe Lyon
2016-06-08 10:26           ` Richard Biener
2016-06-08 10:32             ` Jakub Jelinek
2016-06-08 10:33               ` Richard Biener
2016-06-08 14:44                 ` Christophe Lyon
2016-06-08 14:50                   ` Jakub Jelinek
2016-06-09 12:18                     ` Christophe Lyon
2016-06-09 12:31                       ` Jakub Jelinek
2016-06-09 12:40                         ` Christophe Lyon
2016-06-09 12:46                           ` Jakub Jelinek
2016-06-15  8:45                             ` Christophe Lyon
2016-06-21 13:10                               ` Christophe Lyon
2016-06-21 13:13                                 ` Jakub Jelinek
2016-06-21 13:46                                   ` Christophe Lyon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).