]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/unreachable_asm_2.rs
Fix wrong argument in autoderef process
[rust.git] / src / test / mir-opt / unreachable_asm_2.rs
1 #![feature(llvm_asm)]
2
3 enum Empty {}
4
5 fn empty() -> Option<Empty> {
6     None
7 }
8
9 // EMIT_MIR rustc.main.UnreachablePropagation.diff
10 fn main() {
11     if let Some(_x) = empty() {
12         let mut _y;
13
14         if true {
15             // asm instruction stops unreachable propagation to block bb3.
16             unsafe { llvm_asm!("NOP"); }
17             _y = 21;
18         } else {
19             // asm instruction stops unreachable propagation to block bb3.
20             unsafe { llvm_asm!("NOP"); }
21             _y = 42;
22         }
23
24         match _x { }
25     }
26 }