OSDN Git Service

[ValueTracking] improve ComputeNumSignBits for vector constants
authorSanjay Patel <spatel@rotateright.com>
Wed, 22 Jun 2016 19:20:59 +0000 (19:20 +0000)
committerSanjay Patel <spatel@rotateright.com>
Wed, 22 Jun 2016 19:20:59 +0000 (19:20 +0000)
commitefa1f7f367415bf954168d579d59ba339f597e25
treef8bb72ba018ac0736750a5d7e0ba0af5bbb8e8d0
parent577fa41d5096d2da3c97722bc1ffddb10b9a1e70
[ValueTracking] improve ComputeNumSignBits for vector constants

This is similar to the computeKnownBits improvement in rL268479.
There's probably more we can do for vector logic instructions, but
this should let us see non-splat constant masking ops that can
become vector selects instead of and/andn/or sequences.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273459 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/ValueTracking.h
lib/Analysis/ValueTracking.cpp
test/Transforms/InstSimplify/shr-nop.ll