42 lines · plain
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 < %s2; Check that don't crash if the Alias Analysis returns better results than3; before when cloning loop's memoryssa.4 5@a = internal global i16 06 7define void @h() {8entry:9 br label %end10 11body: ; No predecessors!12 call void @g(ptr null)13 br label %end14 15end: ; preds = %while.body, %entry16 ret void17}18 19define internal void @g(ptr %a) #0 {20entry:21 br label %while.cond22 23while.cond: ; preds = %while.body, %entry24 %0 = load i16, ptr %a, align 125 %tobool.not = icmp eq i16 %0, 026 br i1 %tobool.not, label %while.end, label %while.body27 28while.body: ; preds = %while.cond29 call void @f()30 br label %while.cond31 32while.end: ; preds = %while.cond33 ret void34}35 36define internal void @f() #0 {37 store i16 0, ptr @a, align 138 ret void39}40 41attributes #0 = { noinline }42