We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e66f88c commit fe5699dCopy full SHA for fe5699d
tests/codegen/issues/issue-112169.rs renamed to tests/codegen/issues/issue-112169-long-iterator-unroll.rs
@@ -1,19 +1,14 @@
1
-//@ compile-flags: -O
+//@ compile-flags: -O -Z mir-opt-level=4
2
#![crate_type = "lib"]
3
4
// Test that simple iterator-based loops of length > 101 are fully optimized away.
5
// See <https://github.com/rust-lang/rust/issues/112169>
6
7
-// CHECK-LABEL: define{{.*}}i32 @issue_112169(){{.*}}{
+// CHECK-LABEL: issue_112169()
8
#[no_mangle]
9
pub fn issue_112169() -> i32 {
10
- // CHECK-NOT: icmp
11
- // CHECK-NOT: add
12
- // CHECK-NOT: br
13
- // CHECK: ret i32 102
14
15
16
+ // CHECK-NEXT: {{.*}}:
+ // CHECK-NEXT: ret i32 102
17
let mut s = 0;
18
19
for i in 0..102 {
0 commit comments