getLogBase2 tries to iterate over the number of vector elements. Since
the number of elements of a scalable vector is unknown at compile time,
we must return null if the input type is scalable.
Identified by test LLVM.Transforms/InstCombine::nsw.ll
Wouldn't your changes get to LLVM unreachable here? Would it make sense to have a test that checks that X udiv Y don't crash the compiler when both X and Y are scalable vector and Y is a splat of a power of 2?