1 ; Test that LICM works when there is not a loop-preheader
2 ; RUN: llvm-as < %s | opt -licm | llvm-dis
4 void "testfunc"(int %i, bool %ifcond) {
5 br bool %ifcond, label %Then, label %Else
12 %j = phi uint [0, %Then], [12, %Else], [%Next, %Loop]
13 %i = cast int %i to uint
15 %Next = add uint %j, %i2
16 %cond = seteq uint %Next, 0
17 br bool %cond, label %Out, label %Loop