A miscompilation issue has been addressed with refined checking. Fixes: https://github.com/llvm/llvm-project/issues/115149.
Intrinsic::getDeclaration
getOrInsertDeclaration
[l|a]shr iN (X-1)&~X, N-1 -> [z|s]ext(X==0)