]> granicus.if.org Git - llvm/commit
[SelectionDAG] ComputeNumSignBits - support constant pool values from target
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 4 Jun 2019 10:49:06 +0000 (10:49 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 4 Jun 2019 10:49:06 +0000 (10:49 +0000)
commit4d9a476003b62fdb067b5a8440b801ed72730e27
tree0f1d7e38d61b2c96d5879610daf5278c1bc95d4d
parent694eea2a3b5d936ff2dc36f2804295fdad494629
[SelectionDAG] ComputeNumSignBits - support constant pool values from target

As I mentioned on D61887 we don't get many hits on ComputeNumSignBits as we did on computeKnownBits.

The case we do get is interesting though - it allows us to use the 'ConditionalNegate' combine in combineLogicBlendIntoPBLENDV to remove a select.

It comes too late for SSE41 (BLENDV) cases, but SSE2 tests can hit it now. We should probably try to make use of this for SSE41+ targets as well - avoiding variable blends is usually a good idea. I'll investigate as a followup.

Differential Revision: https://reviews.llvm.org/D62777

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362486 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
test/CodeGen/X86/combine-sdiv.ll