[X86] Add custom widening for v2f64->v2i32 strict_fp_to_uint with avx512f, but not...
authorCraig Topper <craig.topper@intel.com>
Thu, 26 Dec 2019 20:26:39 +0000 (12:26 -0800)
committerCraig Topper <craig.topper@intel.com>
Thu, 26 Dec 2019 20:42:27 +0000 (12:42 -0800)
commitbb0138729b8d4af3d8bd888c821ff79f1350f045
treede71ad25156261778a368b4bdcf96caf7d784bfb
parent522ee29a4fb3814db604b585c8637247477ec057
[X86] Add custom widening for v2f64->v2i32 strict_fp_to_uint with avx512f, but not avx512vl.

AVX512F added instruction for vector fp_to_uint conversions. With
AVX512VL we can use a specific instruction that does v2f64->v4i32 with
zeroes in the 2 extra elements. For non-strict nodes without AVX512VL
we relied on type legalization to turn it to v4f64->v4i32 which would
later be widened by op legalization to v8f64->v8i32. But type legalization
doesn't currently widen strict nodes since it doesn't know how to
safely and efficiently pad the extra elements. But for X86 we know
padding with zeroes is safe and efficient so do that ourselves.
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/vec-strict-fptoint-128.ll
llvm/test/CodeGen/X86/vector-constrained-fp-intrinsics.ll