1 ; RUN: llc < %s -march=xcore | FileCheck %s
3 declare void @llvm.xcore.setv.p1(ptr addrspace(1) %r, ptr %p)
4 declare ptr @llvm.xcore.waitevent()
5 declare ptr @llvm.xcore.checkevent(ptr)
6 declare void @llvm.xcore.clre()
8 define i32 @f(ptr addrspace(1) %r) nounwind {
12 call void @llvm.xcore.clre()
13 call void @llvm.xcore.setv.p1(ptr addrspace(1) %r, ptr blockaddress(@f, %L1))
14 call void @llvm.xcore.setv.p1(ptr addrspace(1) %r, ptr blockaddress(@f, %L2))
15 %goto_addr = call ptr @llvm.xcore.waitevent()
17 indirectbr ptr %goto_addr, [label %L1, label %L2]
23 %retval = phi i32 [1, %L1], [2, %L2]
27 define i32 @g(ptr addrspace(1) %r) nounwind {
31 call void @llvm.xcore.clre()
32 call void @llvm.xcore.setv.p1(ptr addrspace(1) %r, ptr blockaddress(@f, %L1))
33 %goto_addr = call ptr @llvm.xcore.checkevent(ptr blockaddress(@f, %L2))
36 indirectbr ptr %goto_addr, [label %L1, label %L2]
42 %retval = phi i32 [1, %L1], [2, %L2]