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 GCC][v2]Simplify alias check code generation in vectorizer


"Bin.Cheng" <amker.cheng@gmail.com> writes:
> +  gcc_assert (TREE_CODE (DR_STEP (dr_a.dr)) == INTEGER_CST);
> +
> +  bool neg_step = tree_int_cst_compare (DR_STEP (dr_a.dr), size_zero_node) < 0;
> +  unsigned HOST_WIDE_INT abs_step = tree_to_uhwi (DR_STEP (dr_a.dr));
> +  if (neg_step)
> +    abs_step = -abs_step;

I might be wrong, but it looks like this would assert for negative steps,
since the tree passed to tree_to_uhwi would be out of range.

Thansk
Richard


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