1 ; RUN: opt -S -passes=loop-rotate -verify-memoryssa < %s | FileCheck %s
5 declare void @f1(i32) convergent
8 ; The call to f1 in the loop header shouldn't be duplicated (meaning, loop
9 ; rotation shouldn't occur), because f1 is convergent.
11 ; CHECK: call void @f1
12 ; CHECK-NOT: call void @f1
14 define void @test(i32 %x) {
19 %n.phi = phi i32 [ %n, %loop.fin ], [ 0, %entry ]
20 call void @f1(i32 %n.phi)
21 %cond = icmp eq i32 %n.phi, %x
22 br i1 %cond, label %exit, label %loop.fin
25 %n = add i32 %n.phi, 1