[PATCH] D14588: [X86][SSE] Transform truncation from v8i32/v16i32 to v8i8/v16i8 into bitand and X86ISD::PACKUS operations during DAG combine.

Cong Hou via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 30 00:26:11 PST 2015


congh updated this revision to Diff 41368.
congh added a comment.

Fix the bug when truncating v4i32 to v2i16 using PACKSS: we need to set proper sign bits by using shift-left plus ashift-right.

When truncating from v2i64, first use SHUFP to extract lower i32 parts from 2 x v2i64 to 1 x v4i32.


http://reviews.llvm.org/D14588

Files:
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/X86/vector-trunc.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14588.41368.patch
Type: text/x-patch
Size: 24517 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151130/27235175/attachment.bin>


More information about the llvm-commits mailing list