[SelectionDAG] Add BUILD_VECTOR support to computeKnownBits and SimplifyDemandedBits
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 8 Sep 2016 12:57:51 +0000 (12:57 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 8 Sep 2016 12:57:51 +0000 (12:57 +0000)
commitcc7b4b511bb366dd2b404b4ec176638954e90a3d
tree6bbef84ac0daf57526054ec90a203e14f2b98b5c
parenta01ee07a19fd92c33ae8af36c24938c3aedc20eb
[SelectionDAG] Add BUILD_VECTOR support to computeKnownBits and SimplifyDemandedBits

Add the ability to computeKnownBits and SimplifyDemandedBits to extract the known zero/one bits from BUILD_VECTOR, returning the known bits that are shared by every vector element.

This is an initial step towards determining the sign bits of a vector (PR29079).

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

llvm-svn: 280927
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/test/CodeGen/AMDGPU/load-constant-i16.ll
llvm/test/CodeGen/AMDGPU/load-global-i16.ll
llvm/test/CodeGen/X86/combine-and.ll