On Thu, May 4, 2017 at 11:04 AM, Robin Dapp <rd...@linux.vnet.ibm.com> wrote:
> Some refactoring and definitions to use for (unknown) DR_MISALIGNMENT,

+#define DR_HAS_NEGATIVE_STEP(DR) \
+  tree_int_cst_compare (DR_STEP (DR), size_zero_node) < 0

this will ICE for non-constant DR_STEP so isn't a suitable define.

If you want sth shorter than tree_int_cst_compare (...) < 0 then
tree_int_cst_sgn (DR_STEP (..)) == -1 should work or
compare_tree_int (DR_STEP (...), 0) < 0.  But I'd rather leave
this unchanged.

The rest of the patch is ok.

Thanks,
Richard.

> gcc/ChangeLog:
>
> 2017-04-26  Robin Dapp  <rd...@linux.vnet.ibm.com>
>
>         * tree-data-ref.h (struct data_reference): Create 
> DR_HAS_NEGATIVE_STEP.
>         * tree-vectorizer.h (dr_misalignment): Define DR_MISALIGNMENT.
>         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use.
>         (vect_update_misalignment_for_peel): Use.
>         (vect_enhance_data_refs_alignment): Use.
>         (vect_no_alias_p): Use.
>         (vect_duplicate_ssa_name_ptr_info): Use.
>         (known_alignment_for_access_p): Use.

Reply via email to