Add support for the inline asm constraint 'K'.
[oota-llvm.git] / test / CodeGen / Mips / inlineasm-cnstrnt-reg.ll
1 ; Positive test for inline register constraints
2 ;
3 ; RUN: llc -march=mipsel < %s | FileCheck %s
4
5 define i32 @main() nounwind {
6 entry:
7
8 ; r with char
9 ;CHECK: #APP
10 ;CHECK: addi ${{[0-9]+}},${{[0-9]+}},23
11 ;CHECK: #NO_APP
12   tail call i8 asm sideeffect "addi $0,$1,$2", "=r,r,n"(i8 27, i8 23) nounwind
13
14 ; r with short
15 ;CHECK: #APP
16 ;CHECK: addi ${{[0-9]+}},${{[0-9]+}},13
17 ;CHECK: #NO_APP
18   tail call i16 asm sideeffect "addi $0,$1,$2", "=r,r,n"(i16 17, i16 13) nounwind
19
20 ; r with int
21 ;CHECK: #APP
22 ;CHECK: addi ${{[0-9]+}},${{[0-9]+}},3
23 ;CHECK: #NO_APP
24   tail call i32 asm sideeffect "addi $0,$1,$2", "=r,r,n"(i32 7, i32 3) nounwind
25  
26   ret i32 0
27 }