[X86] Fix several issues related to X86's psadbw instruction.
authorCong Hou <congh@google.com>
Tue, 24 Nov 2015 19:51:26 +0000 (19:51 +0000)
committerCong Hou <congh@google.com>
Tue, 24 Nov 2015 19:51:26 +0000 (19:51 +0000)
commit5c1d0fd2040c07b467e486fc6d2aeb4da6dab12e
tree8ef3b42b7bf8edc62bee8816900a59474ea898ac
parentf3b9cb324edf1414d48248042e5b0b882a60188d
[X86] Fix several issues related to X86's psadbw instruction.

This patch fixes the following issues:

1. Fix the return type of X86psadbw: it should not be the same type of inputs.
   For vNi8 inputs the output should be vMi64, where M = N/8.
2. Fix the return type of int_x86_avx512_psad_bw_512 accordingly.
3. Fix the definiton of PSADBW, VPSADBW, and VPSADBWY accordingly.
4. Adjust the return type when building a DAG node of X86ISD::PSADBW type.
5. Update related tests.

Differential revision: http://reviews.llvm.org/D14897

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254010 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/IntrinsicsX86.td
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86InstrAVX512.td
lib/Target/X86/X86InstrFragmentsSIMD.td
lib/Target/X86/X86InstrSSE.td
lib/Target/X86/X86IntrinsicsInfo.h
test/CodeGen/X86/avx512bw-intrinsics.ll
test/CodeGen/X86/vector-popcnt-128.ll
test/CodeGen/X86/vector-popcnt-256.ll
test/CodeGen/X86/vector-tzcnt-128.ll
test/CodeGen/X86/vector-tzcnt-256.ll