OSDN Git Service

[X86][SSE] Allow PACKSS to be used to truncate any type of all/none sign bits input
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 21 Nov 2016 12:05:49 +0000 (12:05 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 21 Nov 2016 12:05:49 +0000 (12:05 +0000)
commitf3db8f562ffc584376bdd06ea37a2228e1e9dd9c
tree87320ec48023b6ac6c44900760a8a93179174c89
parentf14d6e165117e78a9968142608a1d6e858935441
[X86][SSE] Allow PACKSS to be used to truncate any type of all/none sign bits input

At the moment we only use truncateVectorCompareWithPACKSS with direct vector comparison results (just one example of a known all/none signbits input).

This change relaxes the direct matching of a SETCC opcode by moving the logic up into SelectionDAG::ComputeNumSignBits and accepting any input with a known splatted signbit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287535 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/packss.ll