[Bug tree-optimization/64946] [AArch64] gcc.target/aarch64/vect-abs-compile.c - "abs" vectorization fails for char/short types
shiva0217 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Jun 8 08:59:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64946
--- Comment #21 from Shiva Chen <shiva0217 at gmail dot com> ---
Hi, Richard
On following example
int a = ABS_EXPR (b);
int c = a - 1;
c will get it's range base on a which is ~[INT_MIN+1, -1]
Even if we transfer to
int a = (int) ABSU_EXPR (b);
int c = a - 1;
Therefore, c still have to consider INT_MIN.
or you mean that we could transfer like
unsigned int a = ABSU_EXPR (b);
int c = (int) (a - 1)
Then we could simplify value range analysis until convert back to int.
we could get
a : [0, -INT_MIN]
a - 1 : [0, INT_MAX] and UINT_MAX
c : [-1, INT_MAX]
More information about the Gcc-bugs
mailing list