]> granicus.if.org Git - llvm/commit
[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)
commit1f641ae1c59ead4b6e600129c9d6af681450d1d3
tree200a6fc9d02d7fa1239881aa3c1d45011befdccd
parent45b3e8f9df5d37f9c539c103f2ce6cc552c0173d
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286345 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86ISelLowering.h
lib/Target/X86/X86InstrAVX512.td
lib/Target/X86/X86InstrFragmentsSIMD.td
lib/Target/X86/X86IntrinsicsInfo.h
test/CodeGen/X86/vec_fp_to_int.ll