1 ; RUN: opt -disable-output -licm -print-memoryssa -enable-mssa-loop-dependency=true < %s 2>&1 | FileCheck %s
4 ; CHECK: 8 = MemoryPhi(
5 ; CHECK: 7 = MemoryPhi(
6 ; CHECK: 9 = MemoryPhi(
9 %e = alloca i16, align 1
12 lbl1: ; preds = %if.else, %cleanup, %entry
13 store i16 undef, i16* %e, align 1
15 br i1 undef, label %for.end, label %if.else
17 for.end: ; preds = %lbl1
18 br i1 undef, label %lbl3, label %lbl2
20 lbl2: ; preds = %lbl3, %for.end
23 lbl3: ; preds = %lbl2, %for.end
24 br i1 undef, label %lbl2, label %cleanup
26 cleanup: ; preds = %lbl3
27 %cleanup.dest = load i32, i32* undef, align 1
28 %switch = icmp ult i32 %cleanup.dest, 1
29 br i1 %switch, label %cleanup.cont, label %lbl1
31 cleanup.cont: ; preds = %cleanup
32 call void @llvm.lifetime.end.p0i8(i64 1, i8* null)
35 if.else: ; preds = %lbl1
41 ; Function Attrs: argmemonly nounwind willreturn
42 declare void @llvm.lifetime.end.p0i8(i64 immarg, i8* nocapture)