]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #94512 - RalfJung:sdiv-ub, r=oli-obk
authorbors <bors@rust-lang.org>
Thu, 3 Mar 2022 12:56:24 +0000 (12:56 +0000)
committerbors <bors@rust-lang.org>
Thu, 3 Mar 2022 12:56:24 +0000 (12:56 +0000)
Miri/CTFE: properly treat overflow in (signed) division/rem as UB

To my surprise, it looks like LLVM treats overflow of signed div/rem as UB. From what I can tell, MIR `Div`/`Rem` directly lowers to the corresponding LLVM operation, so to make that correct we also have to consider these overflows UB in the CTFE/Miri interpreter engine.

r? `@oli-obk`


Trivial merge