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
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
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
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64946
Shiva Chen changed:
What|Removed |Added
CC||shiva0217 at gmail dot com
--- Comment #12