This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH GCC][v2]Simplify alias check code generation in vectorizer
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: "Bin.Cheng" <amker dot cheng at gmail dot com>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, "gcc-patches\@gcc.gnu.org" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 23 Sep 2016 22:53:31 +0100
- Subject: Re: [PATCH GCC][v2]Simplify alias check code generation in vectorizer
- Authentication-results: sourceware.org; auth=none
- References: <VI1PR0802MB2176FC264E50FB7B376B078FE7F70@VI1PR0802MB2176.eurprd08.prod.outlook.com> <CAFiYyc0WHpzNBvF2j=rQnkjr8=qf0idYcP2BcJRA7K_aLJiKLA@mail.gmail.com> <CAHFci2-nQ9Ceh9K0cEVk=Ez0aDeWpeHvHukJSNJbgnaq2Rb1DQ@mail.gmail.com>
"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