blob: ac84d2a16ec4d8cd54c28147306eba1fcfe2dbcf [file] [log] [blame]
Eric Christopher50ab0392012-05-07 03:13:32 +00001; Positive test for inline register constraints
2;
3; RUN: llc -march=mipsel < %s | FileCheck %s
4
5define i32 @main() nounwind {
6entry:
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}