Re: [RFC][PR64946] "abs" vectorization fails for char/short types

2018-06-13 Thread Richard Biener
On Mon, Jun 11, 2018 at 10:28 AM Kugan Vivekanandarajah wrote: > > Hi Richard, > > Thanks for the review and sorry for getting back to you late. > > On 4 June 2018 at 18:38, Richard Biener wrote: > > On Mon, Jun 4, 2018 at 10:18 AM Kugan Vivekanandarajah > > wrote: > >> > >> Hi Richard, > >> >

Re: [RFC][PR64946] "abs" vectorization fails for char/short types

2018-06-11 Thread Kugan Vivekanandarajah
Hi Richard, Thanks for the review and sorry for getting back to you late. On 4 June 2018 at 18:38, Richard Biener wrote: > On Mon, Jun 4, 2018 at 10:18 AM Kugan Vivekanandarajah > wrote: >> >> Hi Richard, >> >> Thanks for the review. >> >> On 1 June 2018 at 22:20, Richard Biener wrote: >> >

Re: [RFC][PR64946] "abs" vectorization fails for char/short types

2018-06-04 Thread Richard Biener
On Mon, Jun 4, 2018 at 10:18 AM Kugan Vivekanandarajah wrote: > > Hi Richard, > > Thanks for the review. > > On 1 June 2018 at 22:20, Richard Biener wrote: > > On Fri, Jun 1, 2018 at 4:12 AM Kugan Vivekanandarajah > > wrote: > >> > >> Hi Richard, > >> > >> This is the revised patch based on the

Re: [RFC][PR64946] "abs" vectorization fails for char/short types

2018-06-04 Thread Kugan Vivekanandarajah
Hi Richard, Thanks for the review. On 1 June 2018 at 22:20, Richard Biener wrote: > On Fri, Jun 1, 2018 at 4:12 AM Kugan Vivekanandarajah > wrote: >> >> Hi Richard, >> >> This is the revised patch based on the review and the discussion in >> https://gcc.gnu.org/ml/gcc/2018-05/msg00179.html. >>

Re: [RFC][PR64946] "abs" vectorization fails for char/short types

2018-06-01 Thread Richard Biener
On Fri, Jun 1, 2018 at 4:12 AM Kugan Vivekanandarajah wrote: > > Hi Richard, > > This is the revised patch based on the review and the discussion in > https://gcc.gnu.org/ml/gcc/2018-05/msg00179.html. > > In summary: > - I skipped (element_precision (type) < element_precision (TREE_TYPE > (@0)))

Re: [RFC][PR64946] "abs" vectorization fails for char/short types

2018-05-31 Thread Kugan Vivekanandarajah
Hi Richard, This is the revised patch based on the review and the discussion in https://gcc.gnu.org/ml/gcc/2018-05/msg00179.html. In summary: - I skipped (element_precision (type) < element_precision (TREE_TYPE (@0))) in the match.pd pattern as this would prevent transformation for the case in

Re: [RFC][PR64946] "abs" vectorization fails for char/short types

2018-05-18 Thread Richard Biener
On Fri, May 18, 2018 at 4:37 AM Kugan Vivekanandarajah < kugan.vivekanandara...@linaro.org> wrote: > Hi Richard, > Thanks for the review. I am revising the patch based on Andrew's comments too. > On 17 May 2018 at 20:36, Richard Biener wrote: > > On Thu, May 17,

Re: [RFC][PR64946] "abs" vectorization fails for char/short types

2018-05-17 Thread Kugan Vivekanandarajah
Hi Richard, Thanks for the review. I am revising the patch based on Andrew's comments too. On 17 May 2018 at 20:36, Richard Biener wrote: > On Thu, May 17, 2018 at 4:56 AM Andrew Pinski wrote: > >> On Wed, May 16, 2018 at 7:14 PM, Kugan

Re: [RFC][PR64946] "abs" vectorization fails for char/short types

2018-05-17 Thread Richard Biener
On Thu, May 17, 2018 at 4:56 AM Andrew Pinski wrote: > On Wed, May 16, 2018 at 7:14 PM, Kugan Vivekanandarajah > wrote: > > As mentioned in the PR, I am trying to add ABSU_EXPR to fix this > > issue. In the attached patch, in

Re: [RFC][PR64946] "abs" vectorization fails for char/short types

2018-05-16 Thread Andrew Pinski
On Wed, May 16, 2018 at 7:14 PM, Kugan Vivekanandarajah wrote: > As mentioned in the PR, I am trying to add ABSU_EXPR to fix this > issue. In the attached patch, in fold_cond_expr_with_comparison I am > generating ABSU_EXPR for these cases. As I understand,

[RFC][PR64946] "abs" vectorization fails for char/short types

2018-05-16 Thread Kugan Vivekanandarajah
As mentioned in the PR, I am trying to add ABSU_EXPR to fix this issue. In the attached patch, in fold_cond_expr_with_comparison I am generating ABSU_EXPR for these cases. As I understand, absu_expr is well defined in RTL. So, the issue is generating absu_expr and transferring to RTL in the