about summary refs log tree commit diff
path: root/tests/codegen/non-terminate/nonempty-infinite-loop.rs
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2025-07-21 14:34:12 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2025-07-22 14:28:48 +0200
commita27f3e3fd1e4d16160f8885b6b06665b5319f56c (patch)
treeb033935392cbadf6f85d2dbddf433a88e323aeeb /tests/codegen/non-terminate/nonempty-infinite-loop.rs
parented93c1783b404d728d4809973a0550eb33cd293f (diff)
downloadrust-a27f3e3fd1e4d16160f8885b6b06665b5319f56c.tar.gz
rust-a27f3e3fd1e4d16160f8885b6b06665b5319f56c.zip
Rename `tests/codegen` into `tests/codegen-llvm`
Diffstat (limited to 'tests/codegen/non-terminate/nonempty-infinite-loop.rs')
-rw-r--r--tests/codegen/non-terminate/nonempty-infinite-loop.rs28
1 files changed, 0 insertions, 28 deletions
diff --git a/tests/codegen/non-terminate/nonempty-infinite-loop.rs b/tests/codegen/non-terminate/nonempty-infinite-loop.rs
deleted file mode 100644
index 0db4ee61b1b..00000000000
--- a/tests/codegen/non-terminate/nonempty-infinite-loop.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-//@ compile-flags: -C opt-level=3
-
-#![crate_type = "lib"]
-
-// Verify that we don't miscompile this even if rustc didn't apply the trivial loop detection to
-// insert the sideeffect intrinsic.
-
-fn infinite_loop() -> u8 {
-    let mut x = 0;
-    // CHECK-NOT: sideeffect
-    loop {
-        if x == 42 {
-            x = 0;
-        } else {
-            x = 42;
-        }
-    }
-}
-
-// CHECK-LABEL: @test
-#[no_mangle]
-fn test() -> u8 {
-    // CHECK-NOT: unreachable
-    // CHECK: br label %{{.+}}
-    // CHECK-NOT: unreachable
-    let x = infinite_loop();
-    x
-}