The attached patch adds code in InstCombiner::FoldSelectOpOp that checks if a Type is a vector before calling function Type::getVectorNumElements.<br>Without this fix, the following command asserts:<br><br>$ opt instcombine1.ll -o instcombine1.bc -O3<br>

<br>Please review.<br>