------- Comment #22 from tkoenig at gcc dot gnu dot org  2009-11-30 19:15 
-------
(In reply to comment #21)

> the "sign" for unsigned steps is always 1, you don't seem to account
> for unsignedness?

(Un)fortunately, there are no unsigned varaibles in Fortran.

> Note that I believe generating
> 
>   step_sign = fold_build3 (fold_build2 (LT_EXPR, boolean_type_node,
>                                   step, build_int_cst (TREE_TYPE (step), 
> 0)),
>                      build_int_cst (type, -1), build_int_cst (type, 1));
> 
> is better as that allows more freedom for fold and efficient expansion
> for the target.  Just double-check that it also works for the
> unrolling ;)

That doesn't work (something about fold_build3 needing five arguments
instead of three), so think I'll submit my patch "as is".

Thanks for your comments! 
> Thanks,
> Richard.
> 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42131

Reply via email to