macro_rules! int_divrem_guard {
    (   $lhs:ident,
        $rhs:ident,
        {   const PANIC_ZERO: &'static str = $zero:literal;
            $simd_call:ident
        },
        $int:ident ) => { ... };
}
🔬This is a nightly-only experimental API. (portable_simd #86656)
Expand description

SAFETY: This macro must only be used to impl Div or Rem and given the matching intrinsic. It guards against LLVM’s UB conditions for integer div or rem using masks and selects, thus guaranteeing a Rust value returns instead.

LLVMRust
N {/,%} 0UBpanic!()
<$int>::MIN / -1UB<$int>::MIN
<$int>::MIN % -1UB0