Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
22441–22444 | What't the concern we can't emulate for STRICT_FROUND. I wonder if we have the same problem when promoting. |
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
22441–22444 | I believe we can't emulate STRICT_FROUND the way we emulate FROUND because adding 0.4999999999 to a value that has no fractional bits will generate a spurious inexact exception when it gets truncated. If the libcall is ok for f32 it should be ok for f16. |
LGTM.
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
22441–22444 | I see, thanks. But we may raise one more inexact exception when truncating back from f32, e.g. 2048.5 |
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
22441–22444 | I don't follow. The f32 libcall should always give back a number with no fractional bits. |
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
22441–22444 | Yes, but 2049 cannot be represented in FP16. The nearest one is 2050. |
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
22441–22444 | We started from f16 which couldn’t have contained 2048.5 right? |
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
22441–22444 | Oh, yes. I missed that. Thank you. |
clang-format not found in user’s local PATH; not linting file.