1 ; RUN: llvm-dis < %s.bc | FileCheck %s
3 define void @loop_nesting() convergent {
6 ; CHECK: [[A:%.*]] = call token @llvm.experimental.convergence.entry()
8 %a = call token @llvm.experimental.convergence.entry()
13 ; CHECK: [[B:%.*]] = call token @llvm.experimental.convergence.anchor()
15 %b = call token @llvm.experimental.convergence.anchor()
16 br i1 undef, label %C, label %D
20 ; CHECK: [[C:%.*]] = call token @llvm.experimental.convergence.loop() [ "convergencectrl"(token [[B]]) ]
21 ; CHEC K: call void @f() [ "convergencectrl"(token [[C]]) ]
23 %c = call token @llvm.experimental.convergence.loop() [ "convergencectrl"(token %b) ]
24 call void @f() [ "convergencectrl"(token %c) ]
29 ; CHECK: call void @f() [ "convergencectrl"(token [[B]]) ]
31 call void @f() [ "convergencectrl"(token %b) ]
32 br i1 undef, label %B, label %E
38 declare void @f() convergent
40 declare token @llvm.experimental.convergence.entry()
41 declare token @llvm.experimental.convergence.anchor()
42 declare token @llvm.experimental.convergence.loop()