[PATCH] D69275: Add constrained int->FP intrinsics
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 26 15:18:43 PST 2019
craig.topper added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:2653
+ return Res;
+ }
+
----------------
uweigand wrote:
> This confuses me again. It seems this may generate a SINT_TO_FP -> HalfVT -> FP_ROUND -> OutVT chain, which introduces a potential double rounding that can lead to incorrect results even disregarding any constrained FP semantics ...
For the only case we have tests for i64->f16. I think any integer value large enough to cause rounding when converted to f32 would be too large to represent at all in f16. Since f16's max exponent of 15 is less than the length of f32's mantissa.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69275/new/
https://reviews.llvm.org/D69275
More information about the llvm-commits
mailing list