about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2023-04-05 19:45:00 +0000
committerCamille GILLOT <gillot.camille@gmail.com>2023-04-15 07:46:47 +0000
commit483525eed300f3615f71ee05ddeeb8e0c232aa53 (patch)
treed2a2d1d713890d37ed3d83a6a01b449440674c50
parentc9409136c7da51b403d18764128f93bb22b7fe22 (diff)
downloadrust-483525eed300f3615f71ee05ddeeb8e0c232aa53.tar.gz
rust-483525eed300f3615f71ee05ddeeb8e0c232aa53.zip
Remove obsolete test.
-rw-r--r--tests/mir-opt/div_overflow.const_dividend.PreCodegen.after.mir17
-rw-r--r--tests/mir-opt/div_overflow.const_divisor.PreCodegen.after.mir11
-rw-r--r--tests/mir-opt/div_overflow.rs19
3 files changed, 0 insertions, 47 deletions
diff --git a/tests/mir-opt/div_overflow.const_dividend.PreCodegen.after.mir b/tests/mir-opt/div_overflow.const_dividend.PreCodegen.after.mir
deleted file mode 100644
index 1a7fb916e56..00000000000
--- a/tests/mir-opt/div_overflow.const_dividend.PreCodegen.after.mir
+++ /dev/null
@@ -1,17 +0,0 @@
-// MIR for `const_dividend` after PreCodegen
-
-fn const_dividend(_1: i32) -> i32 {
-    debug a => _1;                       // in scope 0 at $DIR/div_overflow.rs:+0:23: +0:24
-    let mut _0: i32;                     // return place in scope 0 at $DIR/div_overflow.rs:+0:34: +0:37
-    let mut _2: bool;                    // in scope 0 at $DIR/div_overflow.rs:+1:5: +1:12
-
-    bb0: {
-        _2 = Eq(_1, const 0_i32);        // scope 0 at $DIR/div_overflow.rs:+1:5: +1:12
-        assert(!move _2, "attempt to divide `{}` by zero", const 256_i32) -> bb1; // scope 0 at $DIR/div_overflow.rs:+1:5: +1:12
-    }
-
-    bb1: {
-        _0 = Div(const 256_i32, _1);     // scope 0 at $DIR/div_overflow.rs:+1:5: +1:12
-        return;                          // scope 0 at $DIR/div_overflow.rs:+2:2: +2:2
-    }
-}
diff --git a/tests/mir-opt/div_overflow.const_divisor.PreCodegen.after.mir b/tests/mir-opt/div_overflow.const_divisor.PreCodegen.after.mir
deleted file mode 100644
index 5526a194be5..00000000000
--- a/tests/mir-opt/div_overflow.const_divisor.PreCodegen.after.mir
+++ /dev/null
@@ -1,11 +0,0 @@
-// MIR for `const_divisor` after PreCodegen
-
-fn const_divisor(_1: i32) -> i32 {
-    debug a => _1;                       // in scope 0 at $DIR/div_overflow.rs:+0:22: +0:23
-    let mut _0: i32;                     // return place in scope 0 at $DIR/div_overflow.rs:+0:33: +0:36
-
-    bb0: {
-        _0 = Div(_1, const 256_i32);     // scope 0 at $DIR/div_overflow.rs:+1:5: +1:12
-        return;                          // scope 0 at $DIR/div_overflow.rs:+2:2: +2:2
-    }
-}
diff --git a/tests/mir-opt/div_overflow.rs b/tests/mir-opt/div_overflow.rs
deleted file mode 100644
index fe34a865b93..00000000000
--- a/tests/mir-opt/div_overflow.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// ignore-wasm32 compiled with panic=abort by default
-// compile-flags: -Copt-level=0 -Coverflow-checks=yes
-
-// Tests that division with a const does not emit a panicking branch for overflow
-
-// EMIT_MIR div_overflow.const_divisor.PreCodegen.after.mir
-pub fn const_divisor(a: i32) -> i32 {
-    a / 256
-}
-
-// EMIT_MIR div_overflow.const_dividend.PreCodegen.after.mir
-pub fn const_dividend(a: i32) -> i32 {
-    256 / a
-}
-
-fn main() {
-    const_divisor(123);
-    const_dividend(123);
-}