File tree Expand file tree Collapse file tree 2 files changed +25
-3
lines changed Expand file tree Collapse file tree 2 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -41,10 +41,8 @@ pub fn if_constant_match() {
4141 _ => 4 ,
4242 } ;
4343
44- // CHECK: br label %[[MINUS1:.+]]
44+ // CHECK: br label %{{.+}}
4545 _ = match -1 {
46- // CHECK: [[MINUS1]]:
47- // CHECK: store i32 1
4846 -1 => 1 ,
4947 _ => 0 ,
5048 }
Original file line number Diff line number Diff line change 1+ //@ compile-flags: -Cno-prepopulate-passes -Copt-level=0
2+
3+ #![ crate_type = "lib" ]
4+
5+ #[ inline( never) ]
6+ fn test < const SIZE : usize > ( ) {
7+ // CHECK-LABEL: no_alloca_inside_if_false::test
8+ // CHECK: start:
9+ // CHECK-NEXT: %0 = alloca
10+ // CHECK-NEXT: %vec = alloca
11+ // CHECK-NOT: %arr = alloca
12+ if const { SIZE < 4096 } {
13+ let arr = [ 0u8 ; SIZE ] ;
14+ std:: hint:: black_box ( & arr) ;
15+ } else {
16+ let vec = vec ! [ 0u8 ; SIZE ] ;
17+ std:: hint:: black_box ( & vec) ;
18+ }
19+ }
20+
21+
22+ pub fn main ( ) {
23+ test :: < 8192 > ( ) ;
24+ }
You can’t perform that action at this time.
0 commit comments