[AVX-512] Add lowering to cvttpd2udq/cvttps2udq for fptoui v2f64/2f32 to 2i32
authorCraig Topper <craig.topper@gmail.com>
Wed, 9 Nov 2016 07:48:51 +0000 (07:48 +0000)
committerCraig Topper <craig.topper@gmail.com>
Wed, 9 Nov 2016 07:48:51 +0000 (07:48 +0000)
commitf334ac19adfbfcbd9f12185d5b64bdf35b75f7f9
tree54ae291b6c65932cc4aec79d94dd8b5c0c549f48
parent731bf9c5d61752bf63bf2d0eb11d7d63e9543a93
[AVX-512] Add lowering to cvttpd2udq/cvttps2udq for fptoui v2f64/2f32 to 2i32

This patch adds support for fptoui to 2i32 from both 2f64 and 2f32, building on Simon's change for the signed version in r284459 and using AVX-512 instructions.

If we don't have VLX support we need to use a 512-bit operation for v2f64->v2i32 and extract the result.

It also recognises that cvttpd2udq zeroes the upper 64-bits of the xmm result.

Differential Revision: https://reviews.llvm.org/D26331

llvm-svn: 286345
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/lib/Target/X86/X86ISelLowering.h
llvm/lib/Target/X86/X86InstrAVX512.td
llvm/lib/Target/X86/X86InstrFragmentsSIMD.td
llvm/lib/Target/X86/X86IntrinsicsInfo.h
llvm/test/CodeGen/X86/vec_fp_to_int.ll