Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
22440–22443 | 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 | ||
---|---|---|
22440–22443 | 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 | ||
---|---|---|
22440–22443 | 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 | ||
---|---|---|
22440–22443 | I don't follow. The f32 libcall should always give back a number with no fractional bits. |
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
22440–22443 | Yes, but 2049 cannot be represented in FP16. The nearest one is 2050. |
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
22440–22443 | We started from f16 which couldn’t have contained 2048.5 right? |
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
22440–22443 | Oh, yes. I missed that. Thank you. |
What't the concern we can't emulate for STRICT_FROUND. I wonder if we have the same problem when promoting.