-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ConstantFP::isValueValidForType Broken #781
Comments
Test case added here: http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041206/021805.html |
Although the patch passed the nightly test and the regression test, it didn't |
Its unclear to me how this should be implemented. What I want to do is make sure I'm thinking along these lines: float FV = float(V); return isinf(V) || isnan(V) || V == DV Any other ideas? |
That seems reasonable to me. I really have no idea what the right check is. -Chris |
This is a pernicious little bug. Reopened until a solution can be found that |
Not happening for 1.7. I don't think this bug really makes sense. Should we just close it as wontfix? -Chris |
This bug has been around for a long time, we don't have a better solution than |
…iles (llvm#781) This PR refactors OpenCL-specific logic that is rather independent from CIRGen and dialect definition into two new implementation files: `CIRGenOpenCL.cpp` and `CIROpenCLAttrs.cpp`. There will also be a `CIRGenOpenCLRuntime.cpp` in the future as the counterpart of `CGOpenCLRuntime.cpp` from OG CodeGen. But that's basically a dedicated implementation file of a class `CGOpenCLRuntime`, we should not bother it.
…iles (llvm#781) This PR refactors OpenCL-specific logic that is rather independent from CIRGen and dialect definition into two new implementation files: `CIRGenOpenCL.cpp` and `CIROpenCLAttrs.cpp`. There will also be a `CIRGenOpenCLRuntime.cpp` in the future as the counterpart of `CGOpenCLRuntime.cpp` from OG CodeGen. But that's basically a dedicated implementation file of a class `CGOpenCLRuntime`, we should not bother it.
Extended Description
This method will happily accept double values for float constants that are
clearly out of range or have precision beyond the acceptable precision of a
float. The current implementation accepts all double values as valid for float.
It shouldn't do that.
Simply casting double -> float -> double and comparing the two doubles doesn't
work well as a test because of rounding errors and/or conversion errors from
decimal notation in AsmParser. Hex conversions work fine as long as the value is
a valid FP double.
The text was updated successfully, but these errors were encountered: