1; RUN: llc -filetype=obj -march=mipsel -relocation-model=pic -verify-machineinstrs -mips-tail-calls=1 < %s -o - \
2; RUN:   | llvm-objdump  -d - | FileCheck %s -check-prefix=PIC32
3
4; RUN: llc -filetype=obj -march=mipsel -relocation-model=static -verify-machineinstrs -mips-tail-calls=1 < %s -o - \
5; RUN:   | llvm-objdump  -d - | FileCheck %s -check-prefix=STATIC32
6
7; RUN: llc -filetype=obj -march=mips64el -mcpu=mips64 -verify-machineinstrs -mips-tail-calls=1 < %s -o - \
8; RUN:   | llvm-objdump  -d - | FileCheck %s -check-prefix=N64
9
10; RUN: llc -filetype=obj -march=mipsel -relocation-model=pic -mattr=+micromips -mips-tail-calls=1 < %s -o - \
11; RUN:   | llvm-objdump  -d - | FileCheck %s -check-prefix=PIC32MM
12
13; RUN: llc -filetype=obj -march=mipsel -relocation-model=static -mattr=+micromips -mips-tail-calls=1 < %s -o - \
14; RUN:   | llvm-objdump  -d - | FileCheck %s -check-prefix=STATIC32MM
15
16; RUN: llc -filetype=obj -march=mipsel -relocation-model=pic -mcpu=mips32r6 -mips-tail-calls=1 < %s -o - \
17; RUN:   | llvm-objdump  -d - | FileCheck %s  -check-prefix=PIC32R6
18; RUN: llc -filetype=obj -march=mipsel -relocation-model=static -mcpu=mips32r6 -mips-tail-calls=1 < %s -o - \
19; RUN:   | llvm-objdump  -d - | FileCheck %s -check-prefix=STATIC32R6
20
21; RUN: llc -filetype=obj -march=mips64el -mcpu=mips64r6 -mips-tail-calls=1 < %s -o - \
22; RUN:   | llvm-objdump  -d - | FileCheck %s -check-prefix=N64R6
23
24define internal i8 @f2(i8) {
25  ret i8 4
26}
27
28define i8 @f1(i8 signext %i) nounwind {
29  %a = tail call i8 @f2(i8 %i)
30  ret i8 %a
31}
32
33; ALL:        f1:
34; PIC32:      {{[0-9a-z]}}: 08 00 20 03  jr $25
35; STATIC32:   {{[0-9a-z]}}: 00 00 00 08  j 0
36
37; N64:        {{[0-9a-z]+}}: 08 00 20 03  jr $25
38
39; PIC32MM:    {{[0-9a-z]+}}: b9 45 jrc $25
40; STATIC32MM: {{[0-9a-z]}}: 00 d4 00 00 j 0
41
42; PIC32R6:    {{[0-9a-z]}}: 00 00 19 d8  jrc $25
43; STATIC32R6: {{[0-9a-z]}}: 00 00 00 08  j 0
44
45; N64R6:      {{[0-9a-z]+}}: 00 00 19 d8  jrc $25
46
47