File: cpus.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 (70 lines) | stat: -rw-r--r-- 2,987 bytes parent folder | download | duplicates (13)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
; Check that the CPU names work.

; RUN: llc -mtriple=mips -mcpu=generic -filetype=obj < %s \
; RUN:   | llvm-readelf -A - | FileCheck %s --check-prefix=GENERIC
; GENERIC: ISA: MIPS32

; RUN: llc -mtriple=mips -mcpu=mips1 -filetype=obj < %s \
; RUN:   | llvm-readelf -A - | FileCheck %s --check-prefix=MIPS1
; MIPS1: ISA: MIPS1
; RUN: llc -mtriple=mips -mcpu=mips2 -filetype=obj < %s \
; RUN:   | llvm-readelf -A - | FileCheck %s --check-prefix=MIPS2
; MIPS2: ISA: MIPS2
; RUN: llc -mtriple=mips64 -mcpu=mips3 -filetype=obj < %s \
; RUN:   | llvm-readelf -A - | FileCheck %s --check-prefix=MIPS3
; MIPS3: ISA: MIPS3
; RUN: llc -mtriple=mips64 -mcpu=mips4 -filetype=obj < %s \
; RUN:   | llvm-readelf -A - | FileCheck %s --check-prefix=MIPS4
; MIPS4: ISA: MIPS4

; RUN: llc -mtriple=mips -mcpu=mips32 -filetype=obj < %s \
; RUN:   | llvm-readelf -A - | FileCheck %s --check-prefix=MIPS32
; MIPS32: ISA: MIPS32
; RUN: llc -mtriple=mips -mcpu=mips32r2 -filetype=obj < %s \
; RUN:   | llvm-readelf -A - | FileCheck %s --check-prefix=MIPS32R2
; MIPS32R2: ISA: MIPS32r2
; RUN: llc -mtriple=mips -mcpu=mips32r3 -filetype=obj < %s \
; RUN:   | llvm-readelf -A - | FileCheck %s --check-prefix=MIPS32R3
; MIPS32R3: ISA: MIPS32r3
; RUN: llc -mtriple=mips -mcpu=mips32r5 -filetype=obj < %s \
; RUN:   | llvm-readelf -A - | FileCheck %s --check-prefix=MIPS32R5
; MIPS32R5: ISA: MIPS32r5
; RUN: llc -mtriple=mips -mcpu=mips32r6 -filetype=obj < %s \
; RUN:   | llvm-readelf -A - | FileCheck %s --check-prefix=MIPS32R6
; MIPS32R6: ISA: MIPS32r6

; RUN: llc -mtriple=mips64 -mcpu=mips64 -filetype=obj < %s \
; RUN:   | llvm-readelf -A - | FileCheck %s --check-prefix=MIPS64
; MIPS64: ISA: MIPS64
; RUN: llc -mtriple=mips64 -mcpu=mips64r2 -filetype=obj < %s \
; RUN:   | llvm-readelf -A - | FileCheck %s --check-prefix=MIPS64R2
; MIPS64R2: ISA: MIPS64r2
; RUN: llc -mtriple=mips64 -mcpu=mips64r3 -filetype=obj < %s \
; RUN:   | llvm-readelf -A - | FileCheck %s --check-prefix=MIPS64R3
; MIPS64R3: ISA: MIPS64r3
; RUN: llc -mtriple=mips64 -mcpu=mips64r5 -filetype=obj < %s \
; RUN:   | llvm-readelf -A - | FileCheck %s --check-prefix=MIPS64R5
; MIPS64R5: ISA: MIPS64r5
; RUN: llc -mtriple=mips64 -mcpu=mips64r6 -filetype=obj < %s \
; RUN:   | llvm-readelf -A - | FileCheck %s --check-prefix=MIPS64R6
; MIPS64R6: ISA: MIPS64r6

; RUN: llc -mtriple=mips64 -mcpu=octeon -filetype=obj < %s \
; RUN:   | llvm-readelf -A - | FileCheck %s --check-prefix=OCTEON
; OCTEON: ISA: MIPS64r2
; OCTEON: ISA Extension: Cavium Networks Octeon
; RUN: llc -mtriple=mips64 -mcpu=octeon+ -filetype=obj < %s \
; RUN:   | llvm-readelf -A - | FileCheck %s --check-prefix=OCTEONP
; OCTEONP: ISA: MIPS64r2
; OCTEONP: ISA Extension: Cavium Networks OcteonP

; Check that we reject CPUs that are not implemented.

; RUN: not llc < %s -o /dev/null -mtriple=mips64 -mcpu=mips5 2>&1 \
; RUN:   | FileCheck %s --check-prefix=ERROR

; ERROR: LLVM ERROR: Code generation for MIPS-{{.}} is not implemented

define void @foo() {
  ret void
}