Skip to content

Commit 338965b

Browse files
authored
Remove the slice from alloca-inside-if-false
1 parent 2d18a8c commit 338965b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/codegen/no-alloca-inside-if-false.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,14 @@
77
fn test<const SIZE: usize>() {
88
// CHECK-LABEL: no_alloca_inside_if_false::test
99
// CHECK: start:
10-
// CHECK-NEXT: alloca [{{8|16}} x i8]
1110
// CHECK-NEXT: alloca [{{12|24}} x i8]
1211
// CHECK-NOT: alloca
1312
if const { SIZE < 4096 } {
1413
let arr = [0u8; SIZE];
15-
std::hint::black_box(&arr);
14+
std::hint::black_box(arr);
1615
} else {
1716
let vec = vec![0u8; SIZE];
18-
std::hint::black_box(&vec);
17+
std::hint::black_box(vec);
1918
}
2019
}
2120

0 commit comments

Comments
 (0)