[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)
commitb7bbaa669b9e31da18d38684f9a9c3258acf76eb
tree3b4007ef2637cd78b64ffd594432a7de034c5623
parent1c2bd1e9f34eab5e79dc74bf4959859fa72ec7f6
[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.

llvm-svn: 287535
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/packss.ll