Now that SimplifyDemandedBits/SimplifyDemandedVectorElts is simplifying vector elements, we're seeing more constant BUILD_VECTOR containing UNDEFs.
This patch provides opt-in handling of UNDEF elements in matchUnaryPredicate, passing NULL instead of the result ConstantSDNode* argument.
I've updated SelectionDAG::simplifyShift to demonstrate its use.
An equivalent matchBinaryPredicate patch is in progress.