]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/unreachable_asm.rs
Auto merge of #83314 - Aaron1011:print-unstable-value, r=lcnr
[rust.git] / src / test / mir-opt / unreachable_asm.rs
1 #![feature(llvm_asm)]
2
3 enum Empty {}
4
5 fn empty() -> Option<Empty> {
6     None
7 }
8
9 // EMIT_MIR unreachable_asm.main.UnreachablePropagation.diff
10 fn main() {
11     if let Some(_x) = empty() {
12         let mut _y;
13
14         if true {
15             _y = 21;
16         } else {
17             _y = 42;
18         }
19
20         // asm instruction stops unreachable propagation to if else blocks bb4 and bb5.
21         unsafe { llvm_asm!("NOP"); }
22         match _x { }
23     }
24 }