1 ; RUN: llvm-as < %s -disable-output 2>&1 | FileCheck %s -allow-empty
3 ; RUN: llvm-as < %s | llvm-dis > %t1.ll
4 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
5 ; RUN: diff %t1.ll %t2.ll
7 ; RUN: llvm-as < %t1.ll -disable-output 2>&1 | FileCheck %s -allow-empty
12 define void @mixed1() {
13 call void @g() ; not convergent
14 call void @f() ; uncontrolled convergent
15 call void @g() ; not convergent
19 define void @mixed2() {
20 call void @g() ; not convergent
21 %t1_tok1 = call token @llvm.experimental.convergence.anchor()
22 call void @f() [ "convergencectrl"(token %t1_tok1) ]
23 call void @g() ; not convergent
28 define void @region_nesting1() convergent {
30 %tok1 = call token @llvm.experimental.convergence.entry()
31 %tok2 = call token @llvm.experimental.convergence.anchor()
35 br i1 undef, label %C, label %D
38 call void @f() [ "convergencectrl"(token %tok1) ]
42 call void @f() [ "convergencectrl"(token %tok2) ]
46 ; Mirror image of @region_nesting1
47 define void @region_nesting2() {
49 %tok1 = call token @llvm.experimental.convergence.anchor()
50 %tok2 = call token @llvm.experimental.convergence.anchor()
54 br i1 undef, label %C, label %D
57 call void @f() [ "convergencectrl"(token %tok2) ]
61 call void @f() [ "convergencectrl"(token %tok1) ]
65 define void @loop_nesting() convergent {
67 %a = call token @llvm.experimental.convergence.entry()
71 %b = call token @llvm.experimental.convergence.anchor()
72 br i1 undef, label %C, label %D
75 %c = call token @llvm.experimental.convergence.loop() [ "convergencectrl"(token %b) ]
76 call void @f() [ "convergencectrl"(token %c) ]
80 call void @f() [ "convergencectrl"(token %b) ]
81 br i1 undef, label %B, label %E
86 declare void @f() convergent
89 declare token @llvm.experimental.convergence.entry()
90 declare token @llvm.experimental.convergence.anchor()
91 declare token @llvm.experimental.convergence.loop()