[Bug tree-optimization/71034] New: abs(f) u>= 0. is always true
glisse at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon May 9 21:19:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71034
Bug ID: 71034
Summary: abs(f) u>= 0. is always true
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: glisse at gcc dot gnu.org
Target Milestone: ---
A very simple missed optimization, we optimize abs(x)<0 to false (in forwprop,
haven't found the exact place yet) but not abs(x) u>= 0 to true. I noticed it
because cdce now produces this comparison for sqrt, which causes a small
regression on a dead sqrt(abs(x)).
int f(double x){
x=__builtin_fabs(x);
// return x<0;
return !__builtin_isless(x,0);
}
More information about the Gcc-bugs
mailing list