about summary refs log tree commit diff
path: root/tests/codegen/range-loop.rs
diff options
context:
space:
mode:
authorFolkert de Vries <flokkievids@gmail.com>2025-07-23 13:26:30 +0000
committerGitHub <noreply@github.com>2025-07-23 13:26:30 +0000
commit0231fa9adfdc4c03d122087a4400a8199b97a369 (patch)
treee783ca2321426d54b49a031bc9e3ceda4f076375 /tests/codegen/range-loop.rs
parent75fc5ceefb9dc46a1e0956143c98eb419ce2e3b5 (diff)
parent8f0ffa8125f00af923098b30f390f6597b89d80d (diff)
downloadrust-0231fa9adfdc4c03d122087a4400a8199b97a369.tar.gz
rust-0231fa9adfdc4c03d122087a4400a8199b97a369.zip
Merge pull request #1883 from Kobzol/pull
Rustc pull update
Diffstat (limited to 'tests/codegen/range-loop.rs')
-rw-r--r--tests/codegen/range-loop.rs44
1 files changed, 0 insertions, 44 deletions
diff --git a/tests/codegen/range-loop.rs b/tests/codegen/range-loop.rs
deleted file mode 100644
index b131beb40dd..00000000000
--- a/tests/codegen/range-loop.rs
+++ /dev/null
@@ -1,44 +0,0 @@
-//@ ignore-std-debug-assertions
-//@ compile-flags: -Copt-level=3 -C no-prepopulate-passes
-
-#![crate_type = "lib"]
-
-// Ensure that MIR optimizations have cleaned things up enough that the IR we
-// emit is good even without running the LLVM optimizations.
-
-// CHECK-NOT: define
-
-// CHECK-LABEL: define{{.+}}void @call_for_zero_to_n
-#[no_mangle]
-pub fn call_for_zero_to_n(n: u32, f: fn(u32)) {
-    // CHECK: start:
-    // CHECK-NOT: alloca
-    // CHECK: %[[IND:.+]] = alloca [4 x i8]
-    // CHECK-NEXT: %[[ALWAYS_SOME_OPTION:.+]] = alloca
-    // CHECK-NOT: alloca
-    // CHECK: store i32 0, ptr %[[IND]],
-    // CHECK: br label %[[HEAD:.+]]
-
-    // CHECK: [[HEAD]]:
-    // CHECK: %[[T1:.+]] = load i32, ptr %[[IND]],
-    // CHECK: %[[NOT_DONE:.+]] = icmp ult i32 %[[T1]], %n
-    // CHECK: br i1 %[[NOT_DONE]], label %[[BODY:.+]], label %[[BREAK:.+]]
-
-    // CHECK: [[BREAK]]:
-    // CHECK: ret void
-
-    // CHECK: [[BODY]]:
-    // CHECK: %[[T2:.+]] = load i32, ptr %[[IND]],
-    // CHECK: %[[T3:.+]] = add nuw i32 %[[T2]], 1
-    // CHECK: store i32 %[[T3]], ptr %[[IND]],
-
-    // CHECK: store i32 %[[T2]]
-    // CHECK: %[[T4:.+]] = load i32
-    // CHECK: call void %f(i32{{.+}}%[[T4]])
-
-    for i in 0..n {
-        f(i);
-    }
-}
-
-// CHECK-NOT: define