Skip to content

Commit dd93826

Browse files
committed
Added a codegen test for combining RangeToInclusive with other optimizations
Closes #63646
1 parent 0b63477 commit dd93826

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//@ compile-flags: -O
2+
3+
#![crate_type = "lib"]
4+
5+
// CHECK-LABEL: @and_stuff
6+
#[no_mangle]
7+
pub fn and_stuff(a: i32, mut b: i32) -> i32 {
8+
// CHECK: start:
9+
// CHECK-NEXT: and
10+
// CHECK-NEXT: ret
11+
for _ in 0..=64 {
12+
b &= a;
13+
}
14+
15+
b
16+
}

0 commit comments

Comments
 (0)