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

2016-06-08 Thread shiva0217 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64946 --- Comment #21 from Shiva Chen --- 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; Therefor

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

2016-06-08 Thread shiva0217 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64946 --- Comment #19 from Shiva Chen --- 2016-06-06 15:41 GMT+08:00 rguenther at suse dot de : > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64946 > > --- Comment #18 from rguenther at suse dot de --- > On Mon, 6 Jun 2016, shiva0217

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

2016-06-05 Thread shiva0217 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64946 --- Comment #17 from Shiva Chen --- Hi, Richard Thanks for the explanation :) So the transformation (short)abs((int)short_var) -> abs (short_var) should guard by TYPE_OVERFLOW_WRAPS because when TYPE_OVERFLOW_WRAPS is true, signed operation

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

2016-06-03 Thread shiva0217 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64946 --- Comment #14 from Shiva Chen --- I'm not sure my understanding was correct. To my understanding, TYPE_OVERFLOW_UNDEFINED is true imply that signed overflow won't occur. E.g. in tree-scalar-evolution.c simple_iv (...) { ... iv->no_over

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

2016-06-02 Thread shiva0217 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64946 Shiva Chen changed: What|Removed |Added CC||shiva0217 at gmail dot com --- Comment #12