File: tailcall-wrong-isa.ll

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 1,998,492 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (53 lines) | stat: -rw-r--r-- 2,468 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
; RUN: llc -filetype=obj -mtriple=mipsel -relocation-model=pic -verify-machineinstrs -mips-tail-calls=1 < %s -o - \
; RUN:   | llvm-objdump -d - | FileCheck %s --check-prefix=PIC32

; RUN: llc -filetype=obj -mtriple=mipsel -relocation-model=static -verify-machineinstrs -mips-tail-calls=1 < %s -o - \
; RUN:   | llvm-objdump -d - | FileCheck %s --check-prefix=STATIC32

; RUN: llc -filetype=obj -mtriple=mips64el -relocation-model=pic -mcpu=mips64 -verify-machineinstrs -mips-tail-calls=1 < %s -o - \
; RUN:   | llvm-objdump -d - | FileCheck %s --check-prefix=PIC64

; RUN: llc -filetype=obj -mtriple=mips64el -relocation-model=static -mcpu=mips64 -verify-machineinstrs -mips-tail-calls=1 < %s -o - \
; RUN:   | llvm-objdump -d - | FileCheck %s --check-prefix=STATIC64

; RUN: llc -filetype=obj -mtriple=mipsel -relocation-model=pic -mattr=+micromips -mips-tail-calls=1 < %s -o - \
; RUN:   | llvm-objdump -d - | FileCheck %s --check-prefix=PIC32MM

; RUN: llc -filetype=obj -mtriple=mipsel -relocation-model=static -mattr=+micromips -mips-tail-calls=1 < %s -o - \
; RUN:   | llvm-objdump -d - | FileCheck %s --check-prefix=STATIC32MM

; RUN: llc -filetype=obj -mtriple=mipsel -relocation-model=pic -mcpu=mips32r6 -mips-tail-calls=1 < %s -o - \
; RUN:   | llvm-objdump -d - | FileCheck %s  --check-prefix=PIC32R6
; RUN: llc -filetype=obj -mtriple=mipsel -relocation-model=static -mcpu=mips32r6 -mips-tail-calls=1 < %s -o - \
; RUN:   | llvm-objdump -d - | FileCheck %s --check-prefix=STATIC32R6

; RUN: llc -filetype=obj -mtriple=mips64el -relocation-model=pic -mcpu=mips64r6 -mips-tail-calls=1 < %s -o - \
; RUN:   | llvm-objdump -d - | FileCheck %s --check-prefix=PIC64R6
; RUN: llc -filetype=obj -mtriple=mips64el -relocation-model=static -mcpu=mips64r6 -mips-tail-calls=1 < %s -o - \
; RUN:   | llvm-objdump -d - | FileCheck %s --check-prefix=STATIC64R6


define internal i8 @f2(i8) {
  ret i8 4
}

define i8 @f1(i8 signext %i) nounwind {
  %a = tail call i8 @f2(i8 %i)
  ret i8 %a
}

; ALL:        f1:
; PIC32:      {{[0-9a-z]}}: 08 00 20 03  jr $25
; STATIC32:   {{[0-9a-z]}}: 00 00 00 08  j 0

; PIC64:      {{[0-9a-z]+}}: 08 00 20 03  jr $25
; STATIC64:   {{[0-9]}}: 00 00 00 08  j 0

; PIC32MM:    {{[0-9a-z]+}}: b9 45 jrc $25
; STATIC32MM: {{[0-9a-z]}}: 00 d4 00 00 j 0

; PIC32R6:    {{[0-9a-z]}}: 00 00 19 d8  jrc $25
; STATIC32R6: {{[0-9a-z]}}: 00 00 00 08  j 0

; PIC64R6:    {{[0-9a-z]+}}: 00 00 19 d8  jrc $25
; STATIC64R6: {{[0-9]}}: 00 00 00 08  j 0