Re: [PATCH] Fix vector rotate regression (PR tree-optimization/57233)

2014-06-26 Thread Jakub Jelinek
On Thu, Jun 26, 2014 at 07:43:55AM +0200, Marc Glisse wrote: + if (compute_type == TREE_TYPE (type) + !VECTOR_INTEGER_TYPE_P (TREE_TYPE (rhs2))) +{ + optab oplv, opl, oprv, opr, opo; + oplv = optab_for_tree_code (LSHIFT_EXPR, type, optab_vector); +

Re: [PATCH] Fix vector rotate regression (PR tree-optimization/57233)

2014-06-26 Thread Jakub Jelinek
On Thu, Jun 26, 2014 at 08:10:15AM +0200, Jakub Jelinek wrote: +compute_type = get_compute_type (LSHIFT_EXPR, opl, type); +if (compute_type == TREE_TYPE (type) +|| compute_type != get_compute_type (RSHIFT_EXPR, opr, type) +|| compute_type !=

Re: [PATCH] Fix vector rotate regression (PR tree-optimization/57233)

2014-06-26 Thread Marc Glisse
On Thu, 26 Jun 2014, Jakub Jelinek wrote: So like this? I've also changed get_compute_type so that it will DTRT even for -mavx and V4DImode vectors, so e.g. f5/f6/f8 routines in avx-pr57233.c improve. Also, even for shifts by scalar, if e.g. target doesn't have shifts by scalar at all, and

Re: [PATCH] Fix vector rotate regression (PR tree-optimization/57233)

2014-06-26 Thread Jakub Jelinek
On Thu, Jun 26, 2014 at 01:16:41PM +0200, Marc Glisse wrote: + if (compute_type == TREE_TYPE (type) + !VECTOR_INTEGER_TYPE_P (TREE_TYPE (rhs2))) +{ + optab oplv, opl, oprv, opr, opo; + oplv = optab_for_tree_code (LSHIFT_EXPR, type, optab_vector); +

Re: [PATCH] Fix vector rotate regression (PR tree-optimization/57233)

2014-06-26 Thread Richard Biener
On Thu, 26 Jun 2014, Jakub Jelinek wrote: On Thu, Jun 26, 2014 at 01:16:41PM +0200, Marc Glisse wrote: +if (compute_type == TREE_TYPE (type) + !VECTOR_INTEGER_TYPE_P (TREE_TYPE (rhs2))) + { +optab oplv, opl, oprv, opr, opo; +oplv = optab_for_tree_code

[PATCH] Fix vector rotate regression (PR tree-optimization/57233)

2014-06-25 Thread Jakub Jelinek
Hi! Since we've started folding (a n) | (a (bitsize - n)) etc. into rotates even vectors, we've regressed code quality on targets where we do have vector shifts, but don't have vector rotates. The following patch attempts to fix it, by telling veclower pass not to actually lower it if we have