1 ; RUN: opt -passes="scc-oz-module-inliner,function(loop-mssa(no-op-loop)),recompute-globalsaa,function(loop-mssa(simple-loop-unswitch<nontrivial>))" -disable-output < %s
2 ; Check that don't crash if the Alias Analysis returns better results than
3 ; before when cloning loop's memoryssa.
5 @a = internal global i16 0
11 body: ; No predecessors!
12 call void @g(ptr null)
15 end: ; preds = %while.body, %entry
19 define internal void @g(ptr %a) #0 {
23 while.cond: ; preds = %while.body, %entry
24 %0 = load i16, ptr %a, align 1
25 %tobool.not = icmp eq i16 %0, 0
26 br i1 %tobool.not, label %while.end, label %while.body
28 while.body: ; preds = %while.cond
32 while.end: ; preds = %while.cond
36 define internal void @f() #0 {
37 store i16 0, ptr @a, align 1
41 attributes #0 = { noinline }