public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch]: Fix regression caused by fix for 61917
@ 2015-02-25 18:33 Kai Tietz
  2015-02-25 18:37 ` Jakub Jelinek
  0 siblings, 1 reply; 2+ messages in thread
From: Kai Tietz @ 2015-02-25 18:33 UTC (permalink / raw)
  To: GCC Patches; +Cc: Jakub Jelinek

Hi,

The patch didn't handled the case for dt being vect_constant_def,
where of course the reduc_def_stmt is NULL.
By checking for NULL before testing for PHI, we now fallback for such
cases to old behavior and return in the next if-statment.

2015-02-25  Richard Biener  <rguenther@suse.de>
    Kai Tietz  <ktietz@redhat.com>

    PR tree-optimization/61917
    * tree-vect-loop.c (vectorizable_reduction): Handle obvious case
    that reduc_def_stmt is null.

Tested and will apply as obvious to trunk and 4.9 if there are no objections.

Sorry for the noise.
Kai

Index: tree-vect-loop.c
===================================================================
--- tree-vect-loop.c    (Revision 220968)
+++ tree-vect-loop.c    (Arbeitskopie)
@@ -4912,7 +4912,7 @@ vectorizable_reduction (gimple stmt, gimple_stmt_i
   if (!found_nested_cycle_def)
     reduc_def_stmt = def_stmt;

-  if (gimple_code (reduc_def_stmt) != GIMPLE_PHI)
+  if (reduc_def_stmt && gimple_code (reduc_def_stmt) != GIMPLE_PHI)
     return false;

   if (!(dt == vect_reduction_def

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

* Re: [patch]: Fix regression caused by fix for 61917
  2015-02-25 18:33 [patch]: Fix regression caused by fix for 61917 Kai Tietz
@ 2015-02-25 18:37 ` Jakub Jelinek
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Jelinek @ 2015-02-25 18:37 UTC (permalink / raw)
  To: Kai Tietz; +Cc: GCC Patches

On Wed, Feb 25, 2015 at 07:13:55PM +0100, Kai Tietz wrote:
> Hi,
> 
> The patch didn't handled the case for dt being vect_constant_def,
> where of course the reduc_def_stmt is NULL.
> By checking for NULL before testing for PHI, we now fallback for such
> cases to old behavior and return in the next if-statment.
> 
> 2015-02-25  Richard Biener  <rguenther@suse.de>
>     Kai Tietz  <ktietz@redhat.com>
> 
>     PR tree-optimization/61917
>     * tree-vect-loop.c (vectorizable_reduction): Handle obvious case
>     that reduc_def_stmt is null.
> 
> Tested and will apply as obvious to trunk and 4.9 if there are no objections.

Ok, thanks.

> --- tree-vect-loop.c    (Revision 220968)
> +++ tree-vect-loop.c    (Arbeitskopie)
> @@ -4912,7 +4912,7 @@ vectorizable_reduction (gimple stmt, gimple_stmt_i
>    if (!found_nested_cycle_def)
>      reduc_def_stmt = def_stmt;
> 
> -  if (gimple_code (reduc_def_stmt) != GIMPLE_PHI)
> +  if (reduc_def_stmt && gimple_code (reduc_def_stmt) != GIMPLE_PHI)
>      return false;
> 
>    if (!(dt == vect_reduction_def

	Jakub

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

end of thread, other threads:[~2015-02-25 18:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-25 18:33 [patch]: Fix regression caused by fix for 61917 Kai Tietz
2015-02-25 18:37 ` Jakub Jelinek

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).