[X86][FP16] Combine two steps conversions into direct conversion
authorPhoebe Wang <phoebe.wang@intel.com>
Mon, 13 Feb 2023 14:33:20 +0000 (22:33 +0800)
committerPhoebe Wang <phoebe.wang@intel.com>
Mon, 13 Feb 2023 14:57:56 +0000 (22:57 +0800)
commit6a6c527ee287a4a7787fb5c519014c2e22f718c3
treeadb10d7e9888fad8a3c35174f2d85d9baecfb29d
parent388d679c1dfa7c0cb5c9ee6cd0b8592c3c3d09ef
[X86][FP16] Combine two steps conversions into direct conversion

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.

Reviewed By: LuoYuanke

Differential Revision: https://reviews.llvm.org/D143872
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/avx512fp16-cvt.ll
llvm/test/CodeGen/X86/vec-strict-inttofp-256-fp16.ll