This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] PR21734 fix


On Wed, 2005-06-01 at 22:02 +0300, Dorit Naishlos wrote:
> 
> 
> 
> The updating of phi-nodes in the loop-peeling utils in the vectorizer did
> not take into account the possibility that invariant (and dead) phis of the
> following form could be present in the loop:
>    m2 = phi <init: m15, latch: m15>
> (there are no defs of m in the loop).
> As observed by Jeff, because 'm' is not being defined in the loop, it does
> not have a 'current_def', which results in generating the following phi in
> the duplicated loop:
>   m20 = phi <init: m15, latch: NULL>
> which later leads to an ICE when trying to rename this variable in the
> duplicated loop.
> 
> The following patch fixes that by setting the missing phi-arg to the
> phi-result:
>   m20 = phi <init: m15, latch: m20>
> 
> Bootstrapped and tested on powerpc-apple-darwin.
> 
> ok for mainline?
> 
> Changelogs:
> 
>         PR tree-optimization/21734
>         * tree-vectorizer.c (slpeel_update_phis_for_duplicate_loop): Use
> the
>         phi_result when current_def is not available.
>         (slpeel_update_phi_nodes_for_guard1): Don't fail if current_def is
> not
>         available.
> 
>         PR tree-optimization/21734
>         * g++.dg/vect/pr21734_1.cc: New.
>         * g++.dg/vect/pr21734_2.cc: New.
This is fine.  Please install.

Thanks,
Jeff



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]