This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/64946] [AArch64] gcc.target/aarch64/vect-abs-compile.c - "abs" vectorization fails for char/short types
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 26 Feb 2015 08:48:27 +0000
- Subject: [Bug tree-optimization/64946] [AArch64] gcc.target/aarch64/vect-abs-compile.c - "abs" vectorization fails for char/short types
- Auto-submitted: auto-generated
- References: <bug-64946-4 at http dot gcc dot gnu dot org/bugzilla/>
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.