[SelectionDAG] Update ComputeNumSignBits SRA/SHL handlers to accept scalar or vector...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 24 Oct 2016 21:47:19 +0000 (21:47 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 24 Oct 2016 21:47:19 +0000 (21:47 +0000)
commite3e6585c2d2f57c6354825b411dec9c377fa43f3
tree430a98a4a80d11216e509b3555f9c0c060217069
parent409252fcefacedfd18b461e219c63b84049e04ae
[SelectionDAG] Update ComputeNumSignBits SRA/SHL handlers to accept scalar or vector splats

Use isConstOrConstSplat helper.

Also use APInt instead of getZExtValue directly to avoid out of range issues.

llvm-svn: 285033
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/test/CodeGen/X86/vector-blend.ll