1 ; RUN: opt < %s -loop-rotate -S | FileCheck %s
2 ; RUN: opt < %s -loop-rotate -enable-mssa-loop-dependency=true -verify-memoryssa -S | FileCheck %s
4 ; Test alloca in -loop-rotate.
6 ; We expect a different value for %ptr each iteration (according to the
7 ; definition of alloca). I.e. each @use must be paired with an alloca.
9 ; CHECK: call void @use(i8* %
10 ; CHECK: %ptr = alloca i8
14 declare void @use(i8*)
18 %end = load i16, i16* @e
22 %n.phi = phi i16 [ %n, %loop.fin ], [ 0, %entry ]
24 %cond = icmp eq i16 %n.phi, %end
25 br i1 %cond, label %exit, label %loop.fin
28 %n = add i16 %n.phi, 1
29 call void @use(i8* %ptr)