ValueTracking: ComputeNumSignBits should tolerate misshapen phi nodes
authorDavid Majnemer <david.majnemer@gmail.com>
Sun, 4 Jan 2015 07:06:53 +0000 (07:06 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Sun, 4 Jan 2015 07:06:53 +0000 (07:06 +0000)
commit77e22b7836613f97bfd7579e064b66e3ebc6c2f3
tree873d0e23df0e0d715755d32116286e5a3d585cce
parenta46dd583d61720b5f874b2cbbb8c359ae0dc51f6
ValueTracking: ComputeNumSignBits should tolerate misshapen phi nodes

PHI nodes can have zero operands in the middle of a transform.  It is
expected that utilities in Analysis don't freak out when this happens.

Note that it is considered invalid to allow these misshapen phi nodes to
make it to another pass.

This fixes PR22086.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225126 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ValueTracking.cpp
test/Transforms/JumpThreading/pr22086.ll [new file with mode: 0644]