This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [autovect] [patch] Make store motion use alias oracle
Hello,
> > > OK for autovect?
> >
> > I think tree-if-conv.c should not use movement_possibility at all, and
> > rather use its own function to specify what constructions it handles.
> > As it does not move anything anywhere, using movement_possibility looks
> > a bit weird, and it is hard to specify what semantics you exactly
> > expect.
> >
>
> Attached is the fix to tree-if-conv.c file.
>
> (See attached file: ifcvt_fix.txt)
>
> Still have to re-do all the checking.
>
> Revital
>
> > Zdenek
> Index: tree-if-conv.c
> ===================================================================
> --- tree-if-conv.c (revision 122819)
> +++ tree-if-conv.c (working copy)
> @@ -334,9 +334,42 @@
> return true;
> }
>
> +/* Return true if STMT may have certain side effects
> + and thus ifcvt can not be applied. Otherwise return false. */
> +static bool
> +may_have_side_effect_p (tree stmt)
> +{
> + tree lhs, rhs;
> +
> + if (flag_unswitch_loops
> + && TREE_CODE (stmt) == COND_EXPR)
> + return false;
this condition seems wrong (in ifcvt, you probably should never see
COND_EXPR here).
Zdenek