Fix invalid usage of getNumElements in ComputeNumSignBits.
getNumElements was being used to compute the DemandedElts. Since we
can't know the length of a scalable vector, we will instead ignore the
value of DemandedElts, and bail out in any codepath that needs it.
Fix invalid usages of getNumElements in
computeNumSignBitsVectorConstant. Bail out early if the vector is
scalable.
Identified by test case LLVM.Transforms/InstCombine::nsw.ll
By checking the result of dyn_cast<FixedVectorType>, this switch will select APInt(1, 1) when Ty is a ScalableVectorType.
I guess this should just bail out when the type is a scalable vector.