This is the mail archive of the gcc-bugs@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]

[Bug tree-optimization/64946] [AArch64] gcc.target/aarch64/vect-abs-compile.c - "abs" vectorization fails for char/short types


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64946

--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to vekumar from comment #6)
> (In reply to Andrew Pinski from comment #5)
> > I think you should always use an unsigned type here so it will be defined in
> > the IR.  This is mentioned in bug 22199#c3 .
> 
> Andrew I missed to include something like this 
> 
> +      (if (TYPE_OVERFLOW_WRAPS (TREE_TYPE (@0)))
> +       (convert (op @0 @1)))
> 
> as in  https://gcc.gnu.org/viewcvs?rev=220695&root=gcc&view=rev

I did not miss that, I am just saying you should do it for types that have
undefined overflow also but convert it into a type that wraps.  Meaning you are
not apply the full optimization really.


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