You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem
It is unclear if FLiT Bisect works with NaN and infinity return values. For this reason, we should have automated regression tests. It may be that it is not currently handled correctly.
This is not a fringe feature. Imagine the following user story:
Dan has code he wants to test with FLiT.
He has found when he compiles with -O3, he gets NaN values.
He uses FLiT Bisect to find out which function is causing the divergence (not necessarily where the NaN is generated)
I think it's handled properly, but it might not be. We have actually seen a situation where NaNs were generated from the code. I believe at that point, we checked for NaN in the compare() function and returned a canned 12345 value. But that is a kludge that should be designed away.
Suggested Fix
Create an automated test that has NaN as an output from the optimized code. Perhaps this can be added to that already existing FLiT Bisect example. We'd also want to consider NaN as a larger comparison value than any other finite value, because it is such a bad thing in code.
Once we have a test, we can identify if the code does the right thing, and if not, fix it.
The text was updated successfully, but these errors were encountered:
Bug Report
Describe the problem
It is unclear if FLiT Bisect works with
NaN
and infinity return values. For this reason, we should have automated regression tests. It may be that it is not currently handled correctly.This is not a fringe feature. Imagine the following user story:
-O3
, he getsNaN
values.NaN
is generated)I think it's handled properly, but it might not be. We have actually seen a situation where
NaN
s were generated from the code. I believe at that point, we checked forNaN
in thecompare()
function and returned a canned 12345 value. But that is a kludge that should be designed away.Suggested Fix
Create an automated test that has
NaN
as an output from the optimized code. Perhaps this can be added to that already existing FLiT Bisect example. We'd also want to considerNaN
as a larger comparison value than any other finite value, because it is such a bad thing in code.Once we have a test, we can identify if the code does the right thing, and if not, fix it.
The text was updated successfully, but these errors were encountered: