1 ; RUN: opt < %s -passes=loop-rotate -verify-memoryssa -S | FileCheck %s
3 ; Test alloca in -loop-rotate.
5 ; We expect a different value for %ptr each iteration (according to the
6 ; definition of alloca). I.e. each @use must be paired with an alloca.
8 ; CHECK: call void @use(ptr %
9 ; CHECK: %ptr = alloca i8
13 declare void @use(ptr)
17 %end = load i16, ptr @e
21 %n.phi = phi i16 [ %n, %loop.fin ], [ 0, %entry ]
23 %cond = icmp eq i16 %n.phi, %end
24 br i1 %cond, label %exit, label %loop.fin
27 %n = add i16 %n.phi, 1
28 call void @use(ptr %ptr)