When both v8i64 and v4f16 are not legal in a v8i64->v8f16 conversion, legalizer will breaks it into v8i64->v4i64->v4f32->v8f32->v8f16.
Given we support v4i64->v8f16, we can combine them with a shuffle instruction.
Paths
| Differential D143872
[X86][FP16] Combine two steps conversions into direct conversion ClosedPublic Authored by pengfei on Feb 12 2023, 6:58 PM.
Details Summary When both v8i64 and v4f16 are not legal in a v8i64->v8f16 conversion, legalizer will breaks it into v8i64->v4i64->v4f32->v8f32->v8f16. Given we support v4i64->v8f16, we can combine them with a shuffle instruction.
Diff Detail
Event Timelinepengfei added inline comments.
This revision is now accepted and ready to land.Feb 13 2023, 4:33 AM This revision was landed with ongoing or failed builds.Feb 13 2023, 6:58 AM Closed by commit rG6a6c527ee287: [X86][FP16] Combine two steps conversions into direct conversion (authored by pengfei). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 496826 llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/avx512fp16-cvt.ll
llvm/test/CodeGen/X86/vec-strict-inttofp-256-fp16.ll
|
Should we check the number of operands of concat be 2?