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