[Bug tree-optimization/77387] New: Value range not computed in some cases for ABS_EXPR
kugan at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Aug 26 01:25:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77387
Bug ID: 77387
Summary: Value range not computed in some cases for ABS_EXPR
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: kugan at gcc dot gnu.org
Target Milestone: ---
For testcase:
int foo (int i)
{
int x = i;
x = __builtin_abs (i);
x >>= 24;
if (x > 256)
return 0;
return x;
}
vrp1 dump is:
Value ranges after VRP:
_1: [-INF, 256]
i_2(D): VARYING
x_3: [0, +INF(OVF)]
x_4: VARYING
x_6: [257, +INF] EQUIVALENCES: { x_4 } (1 elements)
x_7: [-INF, 256] EQUIVALENCES: { x_4 } (1 elements)
Removing basic block 3
foo (int i)
{
int x;
int _1;
<bb 2>:
x_3 = ABS_EXPR <i_2(D)>;
x_4 = x_3 >> 24;
if (x_4 > 256)
goto <bb 3>;
else
goto <bb 4>;
<bb 3>:
<bb 4>:
# _1 = PHI <0(3), x_4(2)>
return _1;
}
Note:
x_3: [0, +INF(OVF)]
x_4: VARYING
More information about the Gcc-bugs
mailing list