This is to avoid f16->i64 being lowered to __fixhfdi/__fixunshfdi on 32-bits since neither libgcc nor compiler-rt provide them. https://godbolt.org/z/cjWEsea5v
It also helps to improve the performance by promoting the vector type.
Paths
| Differential D131828
[X86][FP16] Promote FP16->[U]INT to FP16->FP32->[U]INT ClosedPublic Authored by pengfei on Aug 12 2022, 10:52 PM.
Details Summary This is to avoid f16->i64 being lowered to __fixhfdi/__fixunshfdi on 32-bits since neither libgcc nor compiler-rt provide them. https://godbolt.org/z/cjWEsea5v It also helps to improve the performance by promoting the vector type.
Diff Detail
Event Timeline
This revision is now accepted and ready to land.Aug 13 2022, 2:02 AM This revision was landed with ongoing or failed builds.Aug 13 2022, 6:37 PM Closed by commit rG8b69549dc5c5: [X86][FP16] Promote FP16->[U]INT to FP16->FP32->[U]INT (authored by pengfei). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 452466 llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/fpclamptosat_vec.ll
llvm/test/CodeGen/X86/half.ll
llvm/test/CodeGen/X86/vector-half-conversions.ll
|
In 32-bit mode, the half type is passed through stack or xmm register?