[InstCombine][SSE] Add MOVMSK support to SimplifyDemandedUseBits
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 28 Apr 2016 12:22:53 +0000 (12:22 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 28 Apr 2016 12:22:53 +0000 (12:22 +0000)
commitbd4a3be7d29e83d6b35c588abf485ee707402275
treefea83449dc8dd5d6318aaa48567f0648f20967f8
parent1e73ef38827800c7d2de8ea3f75c093f956f50ad
[InstCombine][SSE] Add MOVMSK support to SimplifyDemandedUseBits

The MOVMSK instructions copies a vector elements' sign bits to the low bits of a scalar register and zeros the high bits.

This patch adds MOVMSK support to SimplifyDemandedUseBits so that its aware that the upper bits are known to be zero. It also removes the call to MOVMSK if none of the lower bits are actually required and just returns zero.

Differential Revision: http://reviews.llvm.org/D19614

llvm-svn: 267873
llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
llvm/test/Transforms/InstCombine/x86-movmsk.ll