public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, PR tree-optimization/68327] Compute vectype for live phi nodes when copmputing VF
@ 2015-11-18 11:34 Ilya Enkovich
  2015-11-18 13:44 ` Richard Biener
  0 siblings, 1 reply; 7+ messages in thread
From: Ilya Enkovich @ 2015-11-18 11:34 UTC (permalink / raw)
  To: gcc-patches

Hi,

When we compute vectypes we skip non-relevant phi nodes.  But we process non-relevant alive statements and thus may need vectype of non-relevant live phi node to compute mask vectype.  This patch enables vectype computation for live phi nodes.  Botostrapped and regtested on x86_64-unknown-linux-gnu.  OK for trunk?

Thanks,
Ilya
--
gcc/

2015-11-18  Ilya Enkovich  <enkovich.gnu@gmail.com>

	PR tree-optimization/68327
	* tree-vect-loop.c (vect_determine_vectorization_factor): Don't
	skip non-relevant live phi nodes.

gcc/testsuite/

2015-11-18  Ilya Enkovich  <enkovich.gnu@gmail.com>

	PR tree-optimization/68327
	* gcc.dg/pr68327.c: New test.


diff --git a/gcc/testsuite/gcc.dg/pr68327.c b/gcc/testsuite/gcc.dg/pr68327.c
new file mode 100644
index 0000000..c3e6a94
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr68327.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+int a, d;
+char b, c;
+
+void
+fn1 ()
+{
+  int i = 0;
+  for (; i < 1; i++)
+    d = 1;
+  for (; b; b++)
+    a = 1 && (d & b);
+}
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 80937ec..7dba027 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -216,7 +216,8 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
 
 	  gcc_assert (stmt_info);
 
-	  if (STMT_VINFO_RELEVANT_P (stmt_info))
+	  if (STMT_VINFO_RELEVANT_P (stmt_info)
+	      || STMT_VINFO_LIVE_P (stmt_info))
             {
 	      gcc_assert (!STMT_VINFO_VECTYPE (stmt_info));
               scalar_type = TREE_TYPE (PHI_RESULT (phi));

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

* Re: [PATCH, PR tree-optimization/68327] Compute vectype for live phi nodes when copmputing VF
  2015-11-18 11:34 [PATCH, PR tree-optimization/68327] Compute vectype for live phi nodes when copmputing VF Ilya Enkovich
@ 2015-11-18 13:44 ` Richard Biener
  2015-11-18 13:53   ` Ilya Enkovich
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Biener @ 2015-11-18 13:44 UTC (permalink / raw)
  To: Ilya Enkovich; +Cc: GCC Patches

On Wed, Nov 18, 2015 at 12:34 PM, Ilya Enkovich <enkovich.gnu@gmail.com> wrote:
> Hi,
>
> When we compute vectypes we skip non-relevant phi nodes.  But we process non-relevant alive statements and thus may need vectype of non-relevant live phi node to compute mask vectype.  This patch enables vectype computation for live phi nodes.  Botostrapped and regtested on x86_64-unknown-linux-gnu.  OK for trunk?

Hmm.  What breaks if you instead skip all !relevant stmts and not
compute vectype for life but not relevant ones?  We won't ever
"vectorize" !relevant ones, that is, we don't need their vector type.

Richard.

> Thanks,
> Ilya
> --
> gcc/
>
> 2015-11-18  Ilya Enkovich  <enkovich.gnu@gmail.com>
>
>         PR tree-optimization/68327
>         * tree-vect-loop.c (vect_determine_vectorization_factor): Don't
>         skip non-relevant live phi nodes.
>
> gcc/testsuite/
>
> 2015-11-18  Ilya Enkovich  <enkovich.gnu@gmail.com>
>
>         PR tree-optimization/68327
>         * gcc.dg/pr68327.c: New test.
>
>
> diff --git a/gcc/testsuite/gcc.dg/pr68327.c b/gcc/testsuite/gcc.dg/pr68327.c
> new file mode 100644
> index 0000000..c3e6a94
> --- /dev/null
> +++ b/gcc/testsuite/gcc.dg/pr68327.c
> @@ -0,0 +1,15 @@
> +/* { dg-do compile } */
> +/* { dg-options "-O3" } */
> +
> +int a, d;
> +char b, c;
> +
> +void
> +fn1 ()
> +{
> +  int i = 0;
> +  for (; i < 1; i++)
> +    d = 1;
> +  for (; b; b++)
> +    a = 1 && (d & b);
> +}
> diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
> index 80937ec..7dba027 100644
> --- a/gcc/tree-vect-loop.c
> +++ b/gcc/tree-vect-loop.c
> @@ -216,7 +216,8 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
>
>           gcc_assert (stmt_info);
>
> -         if (STMT_VINFO_RELEVANT_P (stmt_info))
> +         if (STMT_VINFO_RELEVANT_P (stmt_info)
> +             || STMT_VINFO_LIVE_P (stmt_info))
>              {
>               gcc_assert (!STMT_VINFO_VECTYPE (stmt_info));
>                scalar_type = TREE_TYPE (PHI_RESULT (phi));

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

* Re: [PATCH, PR tree-optimization/68327] Compute vectype for live phi nodes when copmputing VF
  2015-11-18 13:44 ` Richard Biener
@ 2015-11-18 13:53   ` Ilya Enkovich
  2015-11-20 11:28     ` Richard Biener
  0 siblings, 1 reply; 7+ messages in thread
From: Ilya Enkovich @ 2015-11-18 13:53 UTC (permalink / raw)
  To: Richard Biener; +Cc: GCC Patches

2015-11-18 16:44 GMT+03:00 Richard Biener <richard.guenther@gmail.com>:
> On Wed, Nov 18, 2015 at 12:34 PM, Ilya Enkovich <enkovich.gnu@gmail.com> wrote:
>> Hi,
>>
>> When we compute vectypes we skip non-relevant phi nodes.  But we process non-relevant alive statements and thus may need vectype of non-relevant live phi node to compute mask vectype.  This patch enables vectype computation for live phi nodes.  Botostrapped and regtested on x86_64-unknown-linux-gnu.  OK for trunk?
>
> Hmm.  What breaks if you instead skip all !relevant stmts and not
> compute vectype for life but not relevant ones?  We won't ever
> "vectorize" !relevant ones, that is, we don't need their vector type.

I tried it and got regression in SLP.  It expected non-null vectype
for non-releveant but live statement. Regression was in
gcc/gcc/testsuite/gfortran.fortran-torture/execute/pr43390.f90

Ilya

>
> Richard.
>
>> Thanks,
>> Ilya

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

* Re: [PATCH, PR tree-optimization/68327] Compute vectype for live phi nodes when copmputing VF
  2015-11-18 13:53   ` Ilya Enkovich
@ 2015-11-20 11:28     ` Richard Biener
  2015-11-20 11:31       ` Ilya Enkovich
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Biener @ 2015-11-20 11:28 UTC (permalink / raw)
  To: Ilya Enkovich; +Cc: GCC Patches

On Wed, Nov 18, 2015 at 2:53 PM, Ilya Enkovich <enkovich.gnu@gmail.com> wrote:
> 2015-11-18 16:44 GMT+03:00 Richard Biener <richard.guenther@gmail.com>:
>> On Wed, Nov 18, 2015 at 12:34 PM, Ilya Enkovich <enkovich.gnu@gmail.com> wrote:
>>> Hi,
>>>
>>> When we compute vectypes we skip non-relevant phi nodes.  But we process non-relevant alive statements and thus may need vectype of non-relevant live phi node to compute mask vectype.  This patch enables vectype computation for live phi nodes.  Botostrapped and regtested on x86_64-unknown-linux-gnu.  OK for trunk?
>>
>> Hmm.  What breaks if you instead skip all !relevant stmts and not
>> compute vectype for life but not relevant ones?  We won't ever
>> "vectorize" !relevant ones, that is, we don't need their vector type.
>
> I tried it and got regression in SLP.  It expected non-null vectype
> for non-releveant but live statement. Regression was in
> gcc/gcc/testsuite/gfortran.fortran-torture/execute/pr43390.f90

Because somebody put a vector type check before

  if (!STMT_VINFO_RELEVANT_P (stmt_info) && !bb_vinfo)
    return false;

@@ -7590,6 +7651,9 @@ vectorizable_comparison (gimple *stmt, g
   tree mask_type;
   tree mask;

+  if (!STMT_VINFO_RELEVANT_P (stmt_info) && !bb_vinfo)
+    return false;
+
   if (!VECTOR_BOOLEAN_TYPE_P (vectype))
     return false;

@@ -7602,8 +7666,6 @@ vectorizable_comparison (gimple *stmt, g
     ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits;

   gcc_assert (ncopies >= 1);
-  if (!STMT_VINFO_RELEVANT_P (stmt_info) && !bb_vinfo)
-    return false;

   if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_internal_def
       && !(STMT_VINFO_DEF_TYPE (stmt_info) == vect_nested_cycle

fixes this particular fallout for me.

Richard.

> Ilya
>
>>
>> Richard.
>>
>>> Thanks,
>>> Ilya

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

* Re: [PATCH, PR tree-optimization/68327] Compute vectype for live phi nodes when copmputing VF
  2015-11-20 11:28     ` Richard Biener
@ 2015-11-20 11:31       ` Ilya Enkovich
  2015-11-20 15:11         ` Ilya Enkovich
  0 siblings, 1 reply; 7+ messages in thread
From: Ilya Enkovich @ 2015-11-20 11:31 UTC (permalink / raw)
  To: Richard Biener; +Cc: GCC Patches

2015-11-20 14:28 GMT+03:00 Richard Biener <richard.guenther@gmail.com>:
> On Wed, Nov 18, 2015 at 2:53 PM, Ilya Enkovich <enkovich.gnu@gmail.com> wrote:
>> 2015-11-18 16:44 GMT+03:00 Richard Biener <richard.guenther@gmail.com>:
>>> On Wed, Nov 18, 2015 at 12:34 PM, Ilya Enkovich <enkovich.gnu@gmail.com> wrote:
>>>> Hi,
>>>>
>>>> When we compute vectypes we skip non-relevant phi nodes.  But we process non-relevant alive statements and thus may need vectype of non-relevant live phi node to compute mask vectype.  This patch enables vectype computation for live phi nodes.  Botostrapped and regtested on x86_64-unknown-linux-gnu.  OK for trunk?
>>>
>>> Hmm.  What breaks if you instead skip all !relevant stmts and not
>>> compute vectype for life but not relevant ones?  We won't ever
>>> "vectorize" !relevant ones, that is, we don't need their vector type.
>>
>> I tried it and got regression in SLP.  It expected non-null vectype
>> for non-releveant but live statement. Regression was in
>> gcc/gcc/testsuite/gfortran.fortran-torture/execute/pr43390.f90
>
> Because somebody put a vector type check before
>
>   if (!STMT_VINFO_RELEVANT_P (stmt_info) && !bb_vinfo)
>     return false;
>
> @@ -7590,6 +7651,9 @@ vectorizable_comparison (gimple *stmt, g
>    tree mask_type;
>    tree mask;
>
> +  if (!STMT_VINFO_RELEVANT_P (stmt_info) && !bb_vinfo)
> +    return false;
> +
>    if (!VECTOR_BOOLEAN_TYPE_P (vectype))
>      return false;
>
> @@ -7602,8 +7666,6 @@ vectorizable_comparison (gimple *stmt, g
>      ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits;
>
>    gcc_assert (ncopies >= 1);
> -  if (!STMT_VINFO_RELEVANT_P (stmt_info) && !bb_vinfo)
> -    return false;
>
>    if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_internal_def
>        && !(STMT_VINFO_DEF_TYPE (stmt_info) == vect_nested_cycle
>
> fixes this particular fallout for me.

I'll try it.

Thanks,
Ilya

>
> Richard.
>
>> Ilya
>>
>>>
>>> Richard.
>>>
>>>> Thanks,
>>>> Ilya

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

* Re: [PATCH, PR tree-optimization/68327] Compute vectype for live phi nodes when copmputing VF
  2015-11-20 11:31       ` Ilya Enkovich
@ 2015-11-20 15:11         ` Ilya Enkovich
  2015-11-23  9:40           ` Richard Biener
  0 siblings, 1 reply; 7+ messages in thread
From: Ilya Enkovich @ 2015-11-20 15:11 UTC (permalink / raw)
  To: Richard Biener; +Cc: GCC Patches

On 20 Nov 14:31, Ilya Enkovich wrote:
> 2015-11-20 14:28 GMT+03:00 Richard Biener <richard.guenther@gmail.com>:
> > On Wed, Nov 18, 2015 at 2:53 PM, Ilya Enkovich <enkovich.gnu@gmail.com> wrote:
> >> 2015-11-18 16:44 GMT+03:00 Richard Biener <richard.guenther@gmail.com>:
> >>> On Wed, Nov 18, 2015 at 12:34 PM, Ilya Enkovich <enkovich.gnu@gmail.com> wrote:
> >>>> Hi,
> >>>>
> >>>> When we compute vectypes we skip non-relevant phi nodes.  But we process non-relevant alive statements and thus may need vectype of non-relevant live phi node to compute mask vectype.  This patch enables vectype computation for live phi nodes.  Botostrapped and regtested on x86_64-unknown-linux-gnu.  OK for trunk?
> >>>
> >>> Hmm.  What breaks if you instead skip all !relevant stmts and not
> >>> compute vectype for life but not relevant ones?  We won't ever
> >>> "vectorize" !relevant ones, that is, we don't need their vector type.
> >>
> >> I tried it and got regression in SLP.  It expected non-null vectype
> >> for non-releveant but live statement. Regression was in
> >> gcc/gcc/testsuite/gfortran.fortran-torture/execute/pr43390.f90
> >
> > Because somebody put a vector type check before
> >
> >   if (!STMT_VINFO_RELEVANT_P (stmt_info) && !bb_vinfo)
> >     return false;
> >
> > @@ -7590,6 +7651,9 @@ vectorizable_comparison (gimple *stmt, g
> >    tree mask_type;
> >    tree mask;
> >
> > +  if (!STMT_VINFO_RELEVANT_P (stmt_info) && !bb_vinfo)
> > +    return false;
> > +
> >    if (!VECTOR_BOOLEAN_TYPE_P (vectype))
> >      return false;
> >
> > @@ -7602,8 +7666,6 @@ vectorizable_comparison (gimple *stmt, g
> >      ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits;
> >
> >    gcc_assert (ncopies >= 1);
> > -  if (!STMT_VINFO_RELEVANT_P (stmt_info) && !bb_vinfo)
> > -    return false;
> >
> >    if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_internal_def
> >        && !(STMT_VINFO_DEF_TYPE (stmt_info) == vect_nested_cycle
> >
> > fixes this particular fallout for me.
> 
> I'll try it.

With this fix it works fine, thanks!  Bootstrapped and regtested on x86_64-unknown-linux-gnu.  OK for trunk?

Ilya
--
gcc/

2015-11-20  Ilya Enkovich  <enkovich.gnu@gmail.com>
	    Richard Biener  <rguenther@suse.de>

	* tree-vect-loop.c (vect_determine_vectorization_factor): Don't
	compute vectype for non-relevant mask producers.
	* gcc/tree-vect-stmts.c (vectorizable_comparison): Check stmt
	relevance earlier.

gcc/testsuite/

2015-11-20  Ilya Enkovich  <enkovich.gnu@gmail.com>

	* gcc.dg/pr68327.c: New test.


diff --git a/gcc/testsuite/gcc.dg/pr68327.c b/gcc/testsuite/gcc.dg/pr68327.c
new file mode 100644
index 0000000..c3e6a94
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr68327.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+int a, d;
+char b, c;
+
+void
+fn1 ()
+{
+  int i = 0;
+  for (; i < 1; i++)
+    d = 1;
+  for (; b; b++)
+    a = 1 && (d & b);
+}
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 80937ec..592372d 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -439,7 +439,8 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
 		 compute a factor.  */
 	      if (TREE_CODE (scalar_type) == BOOLEAN_TYPE)
 		{
-		  mask_producers.safe_push (stmt_info);
+		  if (STMT_VINFO_RELEVANT_P (stmt_info))
+		    mask_producers.safe_push (stmt_info);
 		  bool_result = true;
 
 		  if (gimple_code (stmt) == GIMPLE_ASSIGN
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 0f64aaf..3723b26 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -7546,6 +7546,9 @@ vectorizable_comparison (gimple *stmt, gimple_stmt_iterator *gsi,
   tree mask_type;
   tree mask;
 
+  if (!STMT_VINFO_RELEVANT_P (stmt_info) && !bb_vinfo)
+    return false;
+
   if (!VECTOR_BOOLEAN_TYPE_P (vectype))
     return false;
 
@@ -7558,9 +7561,6 @@ vectorizable_comparison (gimple *stmt, gimple_stmt_iterator *gsi,
     ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits;
 
   gcc_assert (ncopies >= 1);
-  if (!STMT_VINFO_RELEVANT_P (stmt_info) && !bb_vinfo)
-    return false;
-
   if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_internal_def
       && !(STMT_VINFO_DEF_TYPE (stmt_info) == vect_nested_cycle
 	   && reduc_def))

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

* Re: [PATCH, PR tree-optimization/68327] Compute vectype for live phi nodes when copmputing VF
  2015-11-20 15:11         ` Ilya Enkovich
@ 2015-11-23  9:40           ` Richard Biener
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Biener @ 2015-11-23  9:40 UTC (permalink / raw)
  To: Ilya Enkovich; +Cc: GCC Patches

On Fri, Nov 20, 2015 at 4:10 PM, Ilya Enkovich <enkovich.gnu@gmail.com> wrote:
> On 20 Nov 14:31, Ilya Enkovich wrote:
>> 2015-11-20 14:28 GMT+03:00 Richard Biener <richard.guenther@gmail.com>:
>> > On Wed, Nov 18, 2015 at 2:53 PM, Ilya Enkovich <enkovich.gnu@gmail.com> wrote:
>> >> 2015-11-18 16:44 GMT+03:00 Richard Biener <richard.guenther@gmail.com>:
>> >>> On Wed, Nov 18, 2015 at 12:34 PM, Ilya Enkovich <enkovich.gnu@gmail.com> wrote:
>> >>>> Hi,
>> >>>>
>> >>>> When we compute vectypes we skip non-relevant phi nodes.  But we process non-relevant alive statements and thus may need vectype of non-relevant live phi node to compute mask vectype.  This patch enables vectype computation for live phi nodes.  Botostrapped and regtested on x86_64-unknown-linux-gnu.  OK for trunk?
>> >>>
>> >>> Hmm.  What breaks if you instead skip all !relevant stmts and not
>> >>> compute vectype for life but not relevant ones?  We won't ever
>> >>> "vectorize" !relevant ones, that is, we don't need their vector type.
>> >>
>> >> I tried it and got regression in SLP.  It expected non-null vectype
>> >> for non-releveant but live statement. Regression was in
>> >> gcc/gcc/testsuite/gfortran.fortran-torture/execute/pr43390.f90
>> >
>> > Because somebody put a vector type check before
>> >
>> >   if (!STMT_VINFO_RELEVANT_P (stmt_info) && !bb_vinfo)
>> >     return false;
>> >
>> > @@ -7590,6 +7651,9 @@ vectorizable_comparison (gimple *stmt, g
>> >    tree mask_type;
>> >    tree mask;
>> >
>> > +  if (!STMT_VINFO_RELEVANT_P (stmt_info) && !bb_vinfo)
>> > +    return false;
>> > +
>> >    if (!VECTOR_BOOLEAN_TYPE_P (vectype))
>> >      return false;
>> >
>> > @@ -7602,8 +7666,6 @@ vectorizable_comparison (gimple *stmt, g
>> >      ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits;
>> >
>> >    gcc_assert (ncopies >= 1);
>> > -  if (!STMT_VINFO_RELEVANT_P (stmt_info) && !bb_vinfo)
>> > -    return false;
>> >
>> >    if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_internal_def
>> >        && !(STMT_VINFO_DEF_TYPE (stmt_info) == vect_nested_cycle
>> >
>> > fixes this particular fallout for me.
>>
>> I'll try it.
>
> With this fix it works fine, thanks!  Bootstrapped and regtested on x86_64-unknown-linux-gnu.  OK for trunk?

Ok.

Thanks,
Richard.

> Ilya
> --
> gcc/
>
> 2015-11-20  Ilya Enkovich  <enkovich.gnu@gmail.com>
>             Richard Biener  <rguenther@suse.de>
>
>         * tree-vect-loop.c (vect_determine_vectorization_factor): Don't
>         compute vectype for non-relevant mask producers.
>         * gcc/tree-vect-stmts.c (vectorizable_comparison): Check stmt
>         relevance earlier.
>
> gcc/testsuite/
>
> 2015-11-20  Ilya Enkovich  <enkovich.gnu@gmail.com>
>
>         * gcc.dg/pr68327.c: New test.
>
>
> diff --git a/gcc/testsuite/gcc.dg/pr68327.c b/gcc/testsuite/gcc.dg/pr68327.c
> new file mode 100644
> index 0000000..c3e6a94
> --- /dev/null
> +++ b/gcc/testsuite/gcc.dg/pr68327.c
> @@ -0,0 +1,15 @@
> +/* { dg-do compile } */
> +/* { dg-options "-O3" } */
> +
> +int a, d;
> +char b, c;
> +
> +void
> +fn1 ()
> +{
> +  int i = 0;
> +  for (; i < 1; i++)
> +    d = 1;
> +  for (; b; b++)
> +    a = 1 && (d & b);
> +}
> diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
> index 80937ec..592372d 100644
> --- a/gcc/tree-vect-loop.c
> +++ b/gcc/tree-vect-loop.c
> @@ -439,7 +439,8 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
>                  compute a factor.  */
>               if (TREE_CODE (scalar_type) == BOOLEAN_TYPE)
>                 {
> -                 mask_producers.safe_push (stmt_info);
> +                 if (STMT_VINFO_RELEVANT_P (stmt_info))
> +                   mask_producers.safe_push (stmt_info);
>                   bool_result = true;
>
>                   if (gimple_code (stmt) == GIMPLE_ASSIGN
> diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
> index 0f64aaf..3723b26 100644
> --- a/gcc/tree-vect-stmts.c
> +++ b/gcc/tree-vect-stmts.c
> @@ -7546,6 +7546,9 @@ vectorizable_comparison (gimple *stmt, gimple_stmt_iterator *gsi,
>    tree mask_type;
>    tree mask;
>
> +  if (!STMT_VINFO_RELEVANT_P (stmt_info) && !bb_vinfo)
> +    return false;
> +
>    if (!VECTOR_BOOLEAN_TYPE_P (vectype))
>      return false;
>
> @@ -7558,9 +7561,6 @@ vectorizable_comparison (gimple *stmt, gimple_stmt_iterator *gsi,
>      ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits;
>
>    gcc_assert (ncopies >= 1);
> -  if (!STMT_VINFO_RELEVANT_P (stmt_info) && !bb_vinfo)
> -    return false;
> -
>    if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_internal_def
>        && !(STMT_VINFO_DEF_TYPE (stmt_info) == vect_nested_cycle
>            && reduc_def))

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

end of thread, other threads:[~2015-11-23  9:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-18 11:34 [PATCH, PR tree-optimization/68327] Compute vectype for live phi nodes when copmputing VF Ilya Enkovich
2015-11-18 13:44 ` Richard Biener
2015-11-18 13:53   ` Ilya Enkovich
2015-11-20 11:28     ` Richard Biener
2015-11-20 11:31       ` Ilya Enkovich
2015-11-20 15:11         ` Ilya Enkovich
2015-11-23  9:40           ` 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).