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