This eliminates the bounds check in Rust code like
pub fn mid(data: &[i32]) -> i32 { if data.is_empty() { return 0; } return data[data.len()/2]; }
(from https://blog.sigplan.org/2021/11/18/undefined-behavior-deserves-a-better-reputation/)
Alive proofs:
lshr https://alive2.llvm.org/ce/z/nyTu8D
udiv https://alive2.llvm.org/ce/z/CNUZH7
Nit: here and below, we're using "u" or "udiv" to make the unsigned requirements explicit, but we're using the ambiguous ">>" for the shift op.
Better to make that ">>u" or spell out "lshr"?