Add llvm.sideeffect to potential infinite loops and recursions by sfanxiang · Pull Request #59546 · rust-lang/rust
LLVM assumes that a thread will eventually cause side effect. This is not true in Rust if a loop or recursion does nothing in its body, causing undefined behavior even in common cases like loop {}....