Resurrect https://reviews.llvm.org/D89214 (by @topperc)
The behaviour is undefined for an input of 0, otherwise the result is the position of the most significant set bit which must be in the range [0, bitwidth-1]. So any bits above log2 of bitwidth must be 0.
Fixes#74101