[PATCH] D23808: [X86][SSE] Add lowering to cvttpd2dq/cvttps2dq for sitofp v2f64/2f32 to 2i32

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 23 10:24:24 PDT 2016


RKSimon created this revision.
RKSimon added reviewers: mkuper, delena, spatel, andreadb.
RKSimon added a subscriber: llvm-commits.
RKSimon set the repository for this revision to rL LLVM.

As discussed on PR28461 we currently miss the chance to lower "fptosi <2 x double> %arg to <2 x i32>" to cvttpd2dq due to its use of illegal types.

This patch adds support for fptosi to 2i32 from both 2f64 and 2f32.

It also recognises that cvttpd2dq zeroes the upper 64-bits of the xmm result (similar to D23797) - we still don't do this for the cvttpd2dq/cvttps2dq intrinsics  - this can be done in a future patch.

Repository:
  rL LLVM

https://reviews.llvm.org/D23808

Files:
  lib/Target/X86/X86ISelLowering.cpp
  lib/Target/X86/X86ISelLowering.h
  lib/Target/X86/X86InstrAVX512.td
  lib/Target/X86/X86InstrFragmentsSIMD.td
  lib/Target/X86/X86InstrSSE.td
  test/CodeGen/X86/vec_fp_to_int.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23808.69012.patch
Type: text/x-patch
Size: 14062 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160823/8cb55eb1/attachment.bin>


More information about the llvm-commits mailing list