[Bug tree-optimization/107972] New: backward propagation of finite property not performed
drepper.fsp+rhbz at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Dec 5 13:35:28 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107972
Bug ID: 107972
Summary: backward propagation of finite property not performed
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: drepper.fsp+rhbz at gmail dot com
Target Milestone: ---
Here is another example where with the help of the FP ranger capabilities the
compiler should generate better code than it does today (trunk):
double f(double a, double b)
{
if (!__builtin_isfinite(a))
return -1.0;
double res = a + b;
if (! __builtin_isfinite(res))
__builtin_unreachable();
return res;
}
The condition guaranteed by the __builtin_unreachable implies that neither a
nor b cannot be finite. Hence the initial comparison can be elided.
The same is true for - and * and also for the first operand of /.
More information about the Gcc-bugs
mailing list