* [PATCH, rs6000] Early gimple folding of vec_mergeh and vec_mergel for float
@ 2018-08-07 19:25 Will Schmidt
2018-08-07 22:59 ` Segher Boessenkool
0 siblings, 1 reply; 8+ messages in thread
From: Will Schmidt @ 2018-08-07 19:25 UTC (permalink / raw)
To: Richard Biener, Segher Boessenkool, Bill Schmidt, David Edelsohn
Cc: GCC Patches
Hi,
This adds support for gimple folding of vec_mergeh and vec_mergel
for float and double types. Support for the integral types is already
in-tree.
This change includes updates to the fold_mergehl_helper function to handle
creating the (integral) permute vector when the vector type non integer.
Relevant testcases are already in-tree.
OK for trunk?
Thanks,
-Will
[gcc]
2018-08-07 Will Schmidt <will_schmidt@vnet.ibm.com>
* config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
allow folding of mergeh() and mergel() for the float and double types.
(fold_mergehl_helper): Rework to handle building a permute tree
for float vectors.
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 6cb5c87..35c32be 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -15119,24 +15119,39 @@ fold_mergehl_helper (gimple_stmt_iterator *gsi, gimple *stmt, int use_high)
{
tree arg0 = gimple_call_arg (stmt, 0);
tree arg1 = gimple_call_arg (stmt, 1);
tree lhs = gimple_call_lhs (stmt);
tree lhs_type = TREE_TYPE (lhs);
- tree lhs_type_type = TREE_TYPE (lhs_type);
int n_elts = TYPE_VECTOR_SUBPARTS (lhs_type);
int midpoint = n_elts / 2;
int offset = 0;
if (use_high == 1)
offset = midpoint;
- tree_vector_builder elts (lhs_type, VECTOR_CST_NELTS (arg0), 1);
+ /* The permute_type will match the lhs for integral types. For double and
+ float types, the permute type needs to map to the V2 or V4 type that
+ matches size. */
+ tree permute_type;
+ if (INTEGRAL_TYPE_P (TREE_TYPE (lhs_type)))
+ permute_type = lhs_type;
+ else
+ if (TREE_TYPE (lhs_type) == TREE_TYPE (V2DF_type_node))
+ permute_type = V2DI_type_node;
+ else if (TREE_TYPE (lhs_type) == TREE_TYPE (V4SF_type_node))
+ permute_type = V4SI_type_node;
+ else
+ gcc_unreachable ();
+
+ tree_vector_builder elts (permute_type, VECTOR_CST_NELTS (arg0), 1);
for (int i = 0; i < midpoint; i++)
{
- elts.safe_push (build_int_cst (lhs_type_type, offset + i));
- elts.safe_push (build_int_cst (lhs_type_type, offset + n_elts + i));
+ elts.safe_push (build_int_cst (TREE_TYPE (permute_type),
+ offset + i));
+ elts.safe_push (build_int_cst (TREE_TYPE (permute_type),
+ offset + n_elts + i));
}
tree permute = elts.build ();
gimple *g = gimple_build_assign (lhs, VEC_PERM_EXPR, arg0, arg1, permute);
@@ -15757,18 +15772,22 @@ rs6000_gimple_fold_builtin (gimple_stmt_iterator *gsi)
case ALTIVEC_BUILTIN_VMRGLH:
case ALTIVEC_BUILTIN_VMRGLW:
case VSX_BUILTIN_XXMRGLW_4SI:
case ALTIVEC_BUILTIN_VMRGLB:
case VSX_BUILTIN_VEC_MERGEL_V2DI:
+ case VSX_BUILTIN_XXMRGLW_4SF:
+ case VSX_BUILTIN_VEC_MERGEL_V2DF:
fold_mergehl_helper (gsi, stmt, 1);
return true;
/* vec_mergeh (integrals). */
case ALTIVEC_BUILTIN_VMRGHH:
case ALTIVEC_BUILTIN_VMRGHW:
case VSX_BUILTIN_XXMRGHW_4SI:
case ALTIVEC_BUILTIN_VMRGHB:
case VSX_BUILTIN_VEC_MERGEH_V2DI:
+ case VSX_BUILTIN_XXMRGHW_4SF:
+ case VSX_BUILTIN_VEC_MERGEH_V2DF:
fold_mergehl_helper (gsi, stmt, 0);
return true;
/* d = vec_pack (a, b) */
case P8V_BUILTIN_VPKUDUM:
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH, rs6000] Early gimple folding of vec_mergeh and vec_mergel for float
2018-08-07 19:25 [PATCH, rs6000] Early gimple folding of vec_mergeh and vec_mergel for float Will Schmidt
@ 2018-08-07 22:59 ` Segher Boessenkool
2018-08-17 14:01 ` Richard Biener
0 siblings, 1 reply; 8+ messages in thread
From: Segher Boessenkool @ 2018-08-07 22:59 UTC (permalink / raw)
To: Will Schmidt; +Cc: Richard Biener, Bill Schmidt, David Edelsohn, GCC Patches
Hi!
On Tue, Aug 07, 2018 at 02:24:58PM -0500, Will Schmidt wrote:
> This adds support for gimple folding of vec_mergeh and vec_mergel
> for float and double types. Support for the integral types is already
> in-tree.
> + /* The permute_type will match the lhs for integral types. For double and
> + float types, the permute type needs to map to the V2 or V4 type that
> + matches size. */
> + tree permute_type;
> + if (INTEGRAL_TYPE_P (TREE_TYPE (lhs_type)))
> + permute_type = lhs_type;
> + else
> + if (TREE_TYPE (lhs_type) == TREE_TYPE (V2DF_type_node))
> + permute_type = V2DI_type_node;
> + else if (TREE_TYPE (lhs_type) == TREE_TYPE (V4SF_type_node))
> + permute_type = V4SI_type_node;
> + else
> + gcc_unreachable ();
Please write this as
if (INTEGRAL_TYPE_P (TREE_TYPE (lhs_type)))
permute_type = lhs_type;
else if (TREE_TYPE (lhs_type) == TREE_TYPE (V2DF_type_node))
permute_type = V2DI_type_node;
else if (TREE_TYPE (lhs_type) == TREE_TYPE (V4SF_type_node))
permute_type = V4SI_type_node;
else
gcc_unreachable ();
or, if you want to emphasize integer vs. float:
if (INTEGRAL_TYPE_P (TREE_TYPE (lhs_type)))
permute_type = lhs_type;
else
{
if (TREE_TYPE (lhs_type) == TREE_TYPE (V2DF_type_node))
permute_type = V2DI_type_node;
else if (TREE_TYPE (lhs_type) == TREE_TYPE (V4SF_type_node))
permute_type = V4SI_type_node;
else
gcc_unreachable ();
}
Okay for trunk with that changed. Thanks!
Segher
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH, rs6000] Early gimple folding of vec_mergeh and vec_mergel for float
2018-08-07 22:59 ` Segher Boessenkool
@ 2018-08-17 14:01 ` Richard Biener
2018-08-17 15:05 ` Will Schmidt
0 siblings, 1 reply; 8+ messages in thread
From: Richard Biener @ 2018-08-17 14:01 UTC (permalink / raw)
To: Segher Boessenkool
Cc: will_schmidt, William J. Schmidt, David Edelsohn, GCC Patches
On Wed, Aug 8, 2018 at 12:59 AM Segher Boessenkool
<segher@kernel.crashing.org> wrote:
>
> Hi!
>
> On Tue, Aug 07, 2018 at 02:24:58PM -0500, Will Schmidt wrote:
> > This adds support for gimple folding of vec_mergeh and vec_mergel
> > for float and double types. Support for the integral types is already
> > in-tree.
>
> > + /* The permute_type will match the lhs for integral types. For double and
> > + float types, the permute type needs to map to the V2 or V4 type that
> > + matches size. */
> > + tree permute_type;
> > + if (INTEGRAL_TYPE_P (TREE_TYPE (lhs_type)))
> > + permute_type = lhs_type;
> > + else
> > + if (TREE_TYPE (lhs_type) == TREE_TYPE (V2DF_type_node))
> > + permute_type = V2DI_type_node;
> > + else if (TREE_TYPE (lhs_type) == TREE_TYPE (V4SF_type_node))
> > + permute_type = V4SI_type_node;
> > + else
> > + gcc_unreachable ();
>
> Please write this as
>
> if (INTEGRAL_TYPE_P (TREE_TYPE (lhs_type)))
> permute_type = lhs_type;
> else if (TREE_TYPE (lhs_type) == TREE_TYPE (V2DF_type_node))
> permute_type = V2DI_type_node;
> else if (TREE_TYPE (lhs_type) == TREE_TYPE (V4SF_type_node))
> permute_type = V4SI_type_node;
> else
> gcc_unreachable ();
>
> or, if you want to emphasize integer vs. float:
>
> if (INTEGRAL_TYPE_P (TREE_TYPE (lhs_type)))
> permute_type = lhs_type;
> else
> {
> if (TREE_TYPE (lhs_type) == TREE_TYPE (V2DF_type_node))
Are you sure lhs_type is never qualified? That is, for a GIMPLE folder
I'd have expected
if (types_compatible_p (TREE_TYPE (lhs_type), TREE_TYPE (V2DF_type_node)))
for GENERIC
if (TYPE_MAIN_VARIANT (TREE_TYPE (lhs_type)) == TREE_TYPE (V2DF_type_node))
Richard.
> permute_type = V2DI_type_node;
> else if (TREE_TYPE (lhs_type) == TREE_TYPE (V4SF_type_node))
> permute_type = V4SI_type_node;
> else
> gcc_unreachable ();
> }
>
> Okay for trunk with that changed. Thanks!
>
>
> Segher
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH, rs6000] Early gimple folding of vec_mergeh and vec_mergel for float
2018-08-17 14:01 ` Richard Biener
@ 2018-08-17 15:05 ` Will Schmidt
2018-08-17 15:16 ` Richard Biener
0 siblings, 1 reply; 8+ messages in thread
From: Will Schmidt @ 2018-08-17 15:05 UTC (permalink / raw)
To: Richard Biener
Cc: Segher Boessenkool, William J. Schmidt, David Edelsohn, GCC Patches
On Fri, 2018-08-17 at 16:00 +0200, Richard Biener wrote:
> On Wed, Aug 8, 2018 at 12:59 AM Segher Boessenkool
> <segher@kernel.crashing.org> wrote:
> >
> > Hi!
> >
> > On Tue, Aug 07, 2018 at 02:24:58PM -0500, Will Schmidt wrote:
> > > This adds support for gimple folding of vec_mergeh and vec_mergel
> > > for float and double types. Support for the integral types is already
> > > in-tree.
> >
> > > + /* The permute_type will match the lhs for integral types. For double and
> > > + float types, the permute type needs to map to the V2 or V4 type that
> > > + matches size. */
> > > + tree permute_type;
> > > + if (INTEGRAL_TYPE_P (TREE_TYPE (lhs_type)))
> > > + permute_type = lhs_type;
> > > + else
> > > + if (TREE_TYPE (lhs_type) == TREE_TYPE (V2DF_type_node))
> > > + permute_type = V2DI_type_node;
> > > + else if (TREE_TYPE (lhs_type) == TREE_TYPE (V4SF_type_node))
> > > + permute_type = V4SI_type_node;
> > > + else
> > > + gcc_unreachable ();
> >
> > Please write this as
> >
> > if (INTEGRAL_TYPE_P (TREE_TYPE (lhs_type)))
> > permute_type = lhs_type;
> > else if (TREE_TYPE (lhs_type) == TREE_TYPE (V2DF_type_node))
> > permute_type = V2DI_type_node;
> > else if (TREE_TYPE (lhs_type) == TREE_TYPE (V4SF_type_node))
> > permute_type = V4SI_type_node;
> > else
> > gcc_unreachable ();
> >
> > or, if you want to emphasize integer vs. float:
> >
> > if (INTEGRAL_TYPE_P (TREE_TYPE (lhs_type)))
> > permute_type = lhs_type;
> > else
> > {
> > if (TREE_TYPE (lhs_type) == TREE_TYPE (V2DF_type_node))
>
> Are you sure lhs_type is never qualified?
For the V2DF and V4SF types, I am mostly sure, but since you bring it up
I will admit I am not positive. :-)
> That is, for a GIMPLE folder
> I'd have expected
>
> if (types_compatible_p (TREE_TYPE (lhs_type), TREE_TYPE (V2DF_type_node)))
> for GENERIC
>
> if (TYPE_MAIN_VARIANT (TREE_TYPE (lhs_type)) == TREE_TYPE (V2DF_type_node))
Either/both of those seem more robust than what I had come up with, I'll
plan to make an update here.
Any guidance on whether I should prefer "types_compatible_p" versus the
GENERIC "TYPE_MAIN_VARIANT" ? I see more references to the latter in
rs6000.c , but the former seems to make better sense to me just by its
name.
Thanks for the review,
-Will
> Richard.
>
> > permute_type = V2DI_type_node;
> > else if (TREE_TYPE (lhs_type) == TREE_TYPE (V4SF_type_node))
> > permute_type = V4SI_type_node;
> > else
> > gcc_unreachable ();
> > }
> >
> > Okay for trunk with that changed. Thanks!
> >
> >
> > Segher
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH, rs6000] Early gimple folding of vec_mergeh and vec_mergel for float
2018-08-17 15:05 ` Will Schmidt
@ 2018-08-17 15:16 ` Richard Biener
2018-08-20 21:40 ` [PATCH, rs6000] Improve TREE_TYPE comparisons in fold_mergehl_helper() Will Schmidt
0 siblings, 1 reply; 8+ messages in thread
From: Richard Biener @ 2018-08-17 15:16 UTC (permalink / raw)
To: will_schmidt, Will Schmidt
Cc: Segher Boessenkool, William J. Schmidt, David Edelsohn, GCC Patches
On August 17, 2018 5:02:53 PM GMT+02:00, Will Schmidt <will_schmidt@vnet.ibm.com> wrote:
>On Fri, 2018-08-17 at 16:00 +0200, Richard Biener wrote:
>> On Wed, Aug 8, 2018 at 12:59 AM Segher Boessenkool
>> <segher@kernel.crashing.org> wrote:
>> >
>> > Hi!
>> >
>> > On Tue, Aug 07, 2018 at 02:24:58PM -0500, Will Schmidt wrote:
>> > > This adds support for gimple folding of vec_mergeh and
>vec_mergel
>> > > for float and double types. Support for the integral types is
>already
>> > > in-tree.
>> >
>> > > + /* The permute_type will match the lhs for integral types.
>For double and
>> > > + float types, the permute type needs to map to the V2 or V4
>type that
>> > > + matches size. */
>> > > + tree permute_type;
>> > > + if (INTEGRAL_TYPE_P (TREE_TYPE (lhs_type)))
>> > > + permute_type = lhs_type;
>> > > + else
>> > > + if (TREE_TYPE (lhs_type) == TREE_TYPE (V2DF_type_node))
>> > > + permute_type = V2DI_type_node;
>> > > + else if (TREE_TYPE (lhs_type) == TREE_TYPE (V4SF_type_node))
>> > > + permute_type = V4SI_type_node;
>> > > + else
>> > > + gcc_unreachable ();
>> >
>> > Please write this as
>> >
>> > if (INTEGRAL_TYPE_P (TREE_TYPE (lhs_type)))
>> > permute_type = lhs_type;
>> > else if (TREE_TYPE (lhs_type) == TREE_TYPE (V2DF_type_node))
>> > permute_type = V2DI_type_node;
>> > else if (TREE_TYPE (lhs_type) == TREE_TYPE (V4SF_type_node))
>> > permute_type = V4SI_type_node;
>> > else
>> > gcc_unreachable ();
>> >
>> > or, if you want to emphasize integer vs. float:
>> >
>> > if (INTEGRAL_TYPE_P (TREE_TYPE (lhs_type)))
>> > permute_type = lhs_type;
>> > else
>> > {
>> > if (TREE_TYPE (lhs_type) == TREE_TYPE (V2DF_type_node))
>>
>> Are you sure lhs_type is never qualified?
>
>For the V2DF and V4SF types, I am mostly sure, but since you bring it
>up
>I will admit I am not positive. :-)
>
>> That is, for a GIMPLE folder
>> I'd have expected
>>
>> if (types_compatible_p (TREE_TYPE (lhs_type), TREE_TYPE
>(V2DF_type_node)))
>
>> for GENERIC
>>
>> if (TYPE_MAIN_VARIANT (TREE_TYPE (lhs_type)) == TREE_TYPE
>(V2DF_type_node))
>
>Either/both of those seem more robust than what I had come up with,
>I'll
>plan to make an update here.
>
>Any guidance on whether I should prefer "types_compatible_p" versus the
>GENERIC "TYPE_MAIN_VARIANT" ? I see more references to the latter in
>rs6000.c , but the former seems to make better sense to me just by its
>name.
The former if this is called from the GIMPLE stmts folding hook.
Richard.
>Thanks for the review,
>-Will
>
>
>> Richard.
>>
>> > permute_type = V2DI_type_node;
>> > else if (TREE_TYPE (lhs_type) == TREE_TYPE (V4SF_type_node))
>> > permute_type = V4SI_type_node;
>> > else
>> > gcc_unreachable ();
>> > }
>> >
>> > Okay for trunk with that changed. Thanks!
>> >
>> >
>> > Segher
>>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH, rs6000] Improve TREE_TYPE comparisons in fold_mergehl_helper()
2018-08-17 15:16 ` Richard Biener
@ 2018-08-20 21:40 ` Will Schmidt
2018-08-20 22:07 ` Segher Boessenkool
0 siblings, 1 reply; 8+ messages in thread
From: Will Schmidt @ 2018-08-20 21:40 UTC (permalink / raw)
To: Richard Biener
Cc: Segher Boessenkool, William J. Schmidt, David Edelsohn, GCC Patches
Hi,
This is a follow-up to an earlier patch that enabled gimple folding of
vec_mergeh and vec_mergel for the float and double data types.
Per feedback from Richard, use the types_compatible_p helper to ensure
we also catch any qualified types matching the V2DF_ or V4SF_ types.
Regtests ran clean. OK for trunk?
Thanks,
-Will
[gcc]
2018-08-20 Will Schmidt <will_schmidt@vnet.ibm.com>
* config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
wrappers around TREE_TYPE comparisons.
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 97b922f..5f77afd 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -15135,13 +15135,15 @@ fold_mergehl_helper (gimple_stmt_iterator *gsi, gimple *stmt, int use_high)
tree permute_type;
if (INTEGRAL_TYPE_P (TREE_TYPE (lhs_type)))
permute_type = lhs_type;
else
{
- if (TREE_TYPE (lhs_type) == TREE_TYPE (V2DF_type_node))
+ if (types_compatible_p (TREE_TYPE (lhs_type),
+ TREE_TYPE (V2DF_type_node)))
permute_type = V2DI_type_node;
- else if (TREE_TYPE (lhs_type) == TREE_TYPE (V4SF_type_node))
+ else if (types_compatible_p (TREE_TYPE (lhs_type),
+ TREE_TYPE (V4SF_type_node)))
permute_type = V4SI_type_node;
else
gcc_unreachable ();
}
tree_vector_builder elts (permute_type, VECTOR_CST_NELTS (arg0), 1);
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH, rs6000] Improve TREE_TYPE comparisons in fold_mergehl_helper()
2018-08-20 21:40 ` [PATCH, rs6000] Improve TREE_TYPE comparisons in fold_mergehl_helper() Will Schmidt
@ 2018-08-20 22:07 ` Segher Boessenkool
2018-08-21 8:10 ` Richard Biener
0 siblings, 1 reply; 8+ messages in thread
From: Segher Boessenkool @ 2018-08-20 22:07 UTC (permalink / raw)
To: Will Schmidt
Cc: Richard Biener, William J. Schmidt, David Edelsohn, GCC Patches
Hi Will,
On Mon, Aug 20, 2018 at 04:40:35PM -0500, Will Schmidt wrote:
> This is a follow-up to an earlier patch that enabled gimple folding of
> vec_mergeh and vec_mergel for the float and double data types.
>
> Per feedback from Richard, use the types_compatible_p helper to ensure
> we also catch any qualified types matching the V2DF_ or V4SF_ types.
That looks fine; if no one hollers, please commit. Thanks!
I note we use lang_hooks.types_compatible_p a lot, which is a totally
different thing? How confusing :-/
Segher
> 2018-08-20 Will Schmidt <will_schmidt@vnet.ibm.com>
>
> * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
> wrappers around TREE_TYPE comparisons.
>
> diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
> index 97b922f..5f77afd 100644
> --- a/gcc/config/rs6000/rs6000.c
> +++ b/gcc/config/rs6000/rs6000.c
> @@ -15135,13 +15135,15 @@ fold_mergehl_helper (gimple_stmt_iterator *gsi, gimple *stmt, int use_high)
> tree permute_type;
> if (INTEGRAL_TYPE_P (TREE_TYPE (lhs_type)))
> permute_type = lhs_type;
> else
> {
> - if (TREE_TYPE (lhs_type) == TREE_TYPE (V2DF_type_node))
> + if (types_compatible_p (TREE_TYPE (lhs_type),
> + TREE_TYPE (V2DF_type_node)))
> permute_type = V2DI_type_node;
> - else if (TREE_TYPE (lhs_type) == TREE_TYPE (V4SF_type_node))
> + else if (types_compatible_p (TREE_TYPE (lhs_type),
> + TREE_TYPE (V4SF_type_node)))
> permute_type = V4SI_type_node;
> else
> gcc_unreachable ();
> }
> tree_vector_builder elts (permute_type, VECTOR_CST_NELTS (arg0), 1);
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH, rs6000] Improve TREE_TYPE comparisons in fold_mergehl_helper()
2018-08-20 22:07 ` Segher Boessenkool
@ 2018-08-21 8:10 ` Richard Biener
0 siblings, 0 replies; 8+ messages in thread
From: Richard Biener @ 2018-08-21 8:10 UTC (permalink / raw)
To: Segher Boessenkool
Cc: will_schmidt, William J. Schmidt, David Edelsohn, GCC Patches
On Tue, Aug 21, 2018 at 12:07 AM Segher Boessenkool
<segher@kernel.crashing.org> wrote:
>
> Hi Will,
>
> On Mon, Aug 20, 2018 at 04:40:35PM -0500, Will Schmidt wrote:
> > This is a follow-up to an earlier patch that enabled gimple folding of
> > vec_mergeh and vec_mergel for the float and double data types.
> >
> > Per feedback from Richard, use the types_compatible_p helper to ensure
> > we also catch any qualified types matching the V2DF_ or V4SF_ types.
>
> That looks fine; if no one hollers, please commit. Thanks!
>
> I note we use lang_hooks.types_compatible_p a lot, which is a totally
> different thing? How confusing :-/
Yeah, that's supposed to be used in target hooks used by frontends.
Richard.
>
> Segher
>
>
> > 2018-08-20 Will Schmidt <will_schmidt@vnet.ibm.com>
> >
> > * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
> > wrappers around TREE_TYPE comparisons.
> >
> > diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
> > index 97b922f..5f77afd 100644
> > --- a/gcc/config/rs6000/rs6000.c
> > +++ b/gcc/config/rs6000/rs6000.c
> > @@ -15135,13 +15135,15 @@ fold_mergehl_helper (gimple_stmt_iterator *gsi, gimple *stmt, int use_high)
> > tree permute_type;
> > if (INTEGRAL_TYPE_P (TREE_TYPE (lhs_type)))
> > permute_type = lhs_type;
> > else
> > {
> > - if (TREE_TYPE (lhs_type) == TREE_TYPE (V2DF_type_node))
> > + if (types_compatible_p (TREE_TYPE (lhs_type),
> > + TREE_TYPE (V2DF_type_node)))
> > permute_type = V2DI_type_node;
> > - else if (TREE_TYPE (lhs_type) == TREE_TYPE (V4SF_type_node))
> > + else if (types_compatible_p (TREE_TYPE (lhs_type),
> > + TREE_TYPE (V4SF_type_node)))
> > permute_type = V4SI_type_node;
> > else
> > gcc_unreachable ();
> > }
> > tree_vector_builder elts (permute_type, VECTOR_CST_NELTS (arg0), 1);
> >
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2018-08-21 8:10 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-07 19:25 [PATCH, rs6000] Early gimple folding of vec_mergeh and vec_mergel for float Will Schmidt
2018-08-07 22:59 ` Segher Boessenkool
2018-08-17 14:01 ` Richard Biener
2018-08-17 15:05 ` Will Schmidt
2018-08-17 15:16 ` Richard Biener
2018-08-20 21:40 ` [PATCH, rs6000] Improve TREE_TYPE comparisons in fold_mergehl_helper() Will Schmidt
2018-08-20 22:07 ` Segher Boessenkool
2018-08-21 8:10 ` Richard Biener
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).