XCore target: Optimise entsp / retsp selection
[oota-llvm.git] / test / CodeGen / XCore / inline-asm.ll
1 ; RUN: llc < %s -march=xcore | FileCheck %s
2 ; CHECK-LABEL: f1:
3 ; CHECK: foo r0
4 define i32 @f1() nounwind {
5 entry:
6   %asmtmp = tail call i32 asm sideeffect "foo $0", "=r"() nounwind
7   ret i32 %asmtmp
8 }
9
10 ; CHECK-LABEL: f2:
11 ; CHECK: foo 5
12 define void @f2() nounwind {
13 entry:
14   tail call void asm sideeffect "foo $0", "i"(i32 5) nounwind
15   ret void
16 }
17
18 ; CHECK-LABEL: f3:
19 ; CHECK: foo 42
20 define void @f3() nounwind {
21 entry:
22   tail call void asm sideeffect "foo ${0:c}", "i"(i32 42) nounwind
23   ret void
24 }
25
26 ; CHECK-LABEL: f4:
27 ; CHECK: foo -99
28 define void @f4() nounwind {
29 entry:
30   tail call void asm sideeffect "foo ${0:n}", "i"(i32 99) nounwind
31   ret void
32 }