When AVX512FP16 is enabled, FROUND(f16) cannot be dealt with
TypeLegalize, and no libcall in libm is ready for fround(f16) now.
FROUNDEVEN(f16) has related instruction in AVX512FP16.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
llvm/test/CodeGen/X86/fp-roundeven.ll | ||
---|---|---|
45 | Why can’t this just be vrndscalesh? |
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
1954 | What about strict_fround? Where are tests for strict_froundeven? |
llvm/test/CodeGen/X86/fp-roundeven.ll | ||
---|---|---|
45 | Yes, It can. It was a mistake. I'll update, including the summary. |
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
1954 | I used a report_fatal_error to deal with strict_fround. |
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
1954–1957 | For now, vector expands to vrndscalesh. While vrndscaleph can be emited. I'll refine, too. | |
22502 | @craig.topper created this function originally. He mentions
at https://reviews.llvm.org/D73607. Hi Craig, can we chain the FP nodes here? |
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
22502 | Oh, I see. Can we return SDValue() so that we can call lib function finally? |
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
22502 | No, that causes abort for now since round(fp16) is not handled yet in LLVM. I suppose libm hasn't supoprted yet? |
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
22502 | Right, we don't have lib functions for FP16. I think it's OK to report error for now. |
clang-format: please reformat the code