[ValueTracking] Add DemandedElts support to computeKnownBits/ComputeNumSignBits ...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 1 Feb 2020 12:45:46 +0000 (12:45 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 1 Feb 2020 12:45:46 +0000 (12:45 +0000)
commit105e5c940cc026f6761024d3945d7411b1978fdb
treeea23adbd1db7933267c4352aa09aedf1a177209e
parent1acf129bcf9a1b51e301a9fef151254ec4c7ec43
[ValueTracking] Add DemandedElts support to computeKnownBits/ComputeNumSignBits (PR36319)

This patch adds initial support for a DemandedElts mask to the internal computeKnownBits/ComputeNumSignBits methods, matching the SelectionDAG and GlobalISel equivalents.

So far only a couple of instructions have been setup to handle the DemandedElts, the remainder still using the existing 'all elements' default. The plan is to extend support as we have test coverage.

Differential Revision: https://reviews.llvm.org/D73435
llvm/lib/Analysis/ValueTracking.cpp
llvm/test/Transforms/InstCombine/nsw.ll
llvm/test/Transforms/InstCombine/shift-add.ll
llvm/test/Transforms/LoopVectorize/X86/small-size.ll
llvm/test/Transforms/LoopVectorize/X86/x86-interleaved-accesses-masked-group.ll