LLVM does not specify which direction to round ints when converting to floating point numbers. On x86, the direction depends on the status register. By specifying this in the LangRef it ensures no assumptions are made.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
I'm uncomfortable with this change, as I believe that it makes the llvm conversions incompatible with IEEE-754 conversion (which round according to the dynamic rounding mode unless they're in a (language defined) block with static rounding attribute).
I would much prefer that we say something like "On targets with dynamic rounding modes, [su]itofp rounds according to the dynamic mode. On targets without dynamic rounding, [su]itofp uses default rounding."