diff options
Diffstat (limited to 'tests/mir-opt/lower_intrinsics.rs')
-rw-r--r-- | tests/mir-opt/lower_intrinsics.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/mir-opt/lower_intrinsics.rs b/tests/mir-opt/lower_intrinsics.rs index 66dae0e46..7147be43c 100644 --- a/tests/mir-opt/lower_intrinsics.rs +++ b/tests/mir-opt/lower_intrinsics.rs @@ -72,3 +72,10 @@ pub fn assume() { std::intrinsics::assume(true); } } + +// EMIT_MIR lower_intrinsics.with_overflow.LowerIntrinsics.diff +pub fn with_overflow(a: i32, b: i32) { + let _x = core::intrinsics::add_with_overflow(a, b); + let _y = core::intrinsics::sub_with_overflow(a, b); + let _z = core::intrinsics::mul_with_overflow(a, b); +} |