blob: e9daceaa16c85d05269b7bcc236c4ba287c3828b [file] [log] [blame]
Simon Dardisd2ed8ab2016-09-27 13:15:54 +00001; RUN: llc -filetype=obj -march=mipsel -relocation-model=pic -verify-machineinstrs -mips-tail-calls=1 < %s -o - \
Simon Dardisea343152016-08-18 13:22:43 +00002; RUN: | llvm-objdump -d - | FileCheck %s -check-prefix=PIC32
3
Simon Dardisd2ed8ab2016-09-27 13:15:54 +00004; RUN: llc -filetype=obj -march=mipsel -relocation-model=static -verify-machineinstrs -mips-tail-calls=1 < %s -o - \
Simon Dardisea343152016-08-18 13:22:43 +00005; RUN: | llvm-objdump -d - | FileCheck %s -check-prefix=STATIC32
6
Simon Dardisd2ed8ab2016-09-27 13:15:54 +00007; RUN: llc -filetype=obj -march=mips64el -mcpu=mips64 -verify-machineinstrs -mips-tail-calls=1 < %s -o - \
Simon Dardisea343152016-08-18 13:22:43 +00008; RUN: | llvm-objdump -d - | FileCheck %s -check-prefix=N64
9
Simon Dardisd2ed8ab2016-09-27 13:15:54 +000010; RUN: llc -filetype=obj -march=mipsel -relocation-model=pic -mattr=+micromips -mips-tail-calls=1 < %s -o - \
Simon Dardisea343152016-08-18 13:22:43 +000011; RUN: | llvm-objdump -d - | FileCheck %s -check-prefix=PIC32MM
12
Simon Dardisd2ed8ab2016-09-27 13:15:54 +000013; RUN: llc -filetype=obj -march=mipsel -relocation-model=static -mattr=+micromips -mips-tail-calls=1 < %s -o - \
Simon Dardisea343152016-08-18 13:22:43 +000014; RUN: | llvm-objdump -d - | FileCheck %s -check-prefix=STATIC32MM
15
Simon Dardisd2ed8ab2016-09-27 13:15:54 +000016; RUN: llc -filetype=obj -march=mipsel -relocation-model=pic -mcpu=mips32r6 -mips-tail-calls=1 < %s -o - \
Simon Dardisea343152016-08-18 13:22:43 +000017; RUN: | llvm-objdump -d - | FileCheck %s -check-prefix=PIC32R6
Simon Dardisd2ed8ab2016-09-27 13:15:54 +000018; RUN: llc -filetype=obj -march=mipsel -relocation-model=static -mcpu=mips32r6 -mips-tail-calls=1 < %s -o - \
Simon Dardisea343152016-08-18 13:22:43 +000019; RUN: | llvm-objdump -d - | FileCheck %s -check-prefix=STATIC32R6
20
Simon Dardisd2ed8ab2016-09-27 13:15:54 +000021; RUN: llc -filetype=obj -march=mips64el -mcpu=mips64r6 -mips-tail-calls=1 < %s -o - \
Simon Dardisea343152016-08-18 13:22:43 +000022; RUN: | llvm-objdump -d - | FileCheck %s -check-prefix=N64R6
23
24declare i8 @f2(i8)
25
26define i8 @f1(i8 signext %i) nounwind {
27 %a = tail call i8 @f2(i8 %i)
28 ret i8 %a
29}
30
31; PIC32: {{[0-9]}}: 08 00 20 03 jr $25
32; STATIC32: {{[0-9]}}: 00 00 00 08 j 0
33
34; N64: {{[0-9a-z]+}}: 08 00 20 03 jr $25
35
36; PIC32MM: {{[0-9a-z]+}}: b9 45 jrc $25
37; STATIC32MM: {{[0-9]}}: 00 d4 00 00 j 0
38
39; PIC32R6: {{[0-9]}}: 00 00 19 d8 jrc $25
40; STATIC32R6: {{[0-9]}}: 00 00 00 08 j 0
41
42; N64R6: {{[0-9a-z]+}}: 09 00 20 03 jr $25
43