mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
7e501cf4c3
This update was done with the following bash script: find test/CodeGen -name "*.ll" | \ while read NAME; do echo "$NAME" if ! grep -q "^; *RUN: *llc.*debug" $NAME; then TEMP=`mktemp -t temp` cp $NAME $TEMP sed -n "s/^define [^@]*@\([A-Za-z0-9_]*\)(.*$/\1/p" < $NAME | \ while read FUNC; do sed -i '' "s/;\(.*\)\([A-Za-z0-9_-]*\):\( *\)$FUNC: *\$/;\1\2-LABEL:\3$FUNC:/g" $TEMP done sed -i '' "s/;\(.*\)-LABEL-LABEL:/;\1-LABEL:/" $TEMP sed -i '' "s/;\(.*\)-NEXT-LABEL:/;\1-NEXT:/" $TEMP sed -i '' "s/;\(.*\)-NOT-LABEL:/;\1-NOT:/" $TEMP sed -i '' "s/;\(.*\)-DAG-LABEL:/;\1-DAG:/" $TEMP mv $TEMP $NAME fi done llvm-svn: 186280
45 lines
1.2 KiB
LLVM
45 lines
1.2 KiB
LLVM
; RUN: llc < %s -march=xcore | FileCheck %s
|
|
|
|
declare void @llvm.xcore.setv.p1i8(i8 addrspace(1)* %r, i8* %p)
|
|
declare i8* @llvm.xcore.waitevent()
|
|
declare i8* @llvm.xcore.checkevent(i8*)
|
|
declare void @llvm.xcore.clre()
|
|
|
|
define i32 @f(i8 addrspace(1)* %r) nounwind {
|
|
; CHECK-LABEL: f:
|
|
entry:
|
|
; CHECK: clre
|
|
call void @llvm.xcore.clre()
|
|
call void @llvm.xcore.setv.p1i8(i8 addrspace(1)* %r, i8* blockaddress(@f, %L1))
|
|
call void @llvm.xcore.setv.p1i8(i8 addrspace(1)* %r, i8* blockaddress(@f, %L2))
|
|
%goto_addr = call i8* @llvm.xcore.waitevent()
|
|
; CHECK: waiteu
|
|
indirectbr i8* %goto_addr, [label %L1, label %L2]
|
|
L1:
|
|
br label %ret
|
|
L2:
|
|
br label %ret
|
|
ret:
|
|
%retval = phi i32 [1, %L1], [2, %L2]
|
|
ret i32 %retval
|
|
}
|
|
|
|
define i32 @g(i8 addrspace(1)* %r) nounwind {
|
|
; CHECK-LABEL: g:
|
|
entry:
|
|
; CHECK: clre
|
|
call void @llvm.xcore.clre()
|
|
call void @llvm.xcore.setv.p1i8(i8 addrspace(1)* %r, i8* blockaddress(@f, %L1))
|
|
%goto_addr = call i8* @llvm.xcore.checkevent(i8 *blockaddress(@f, %L2))
|
|
; CHECK: setsr 1
|
|
; CHECK: clrsr 1
|
|
indirectbr i8* %goto_addr, [label %L1, label %L2]
|
|
L1:
|
|
br label %ret
|
|
L2:
|
|
br label %ret
|
|
ret:
|
|
%retval = phi i32 [1, %L1], [2, %L2]
|
|
ret i32 %retval
|
|
}
|