71 lines · plain
1; Check that the CPU names work.2 3; RUN: llc -mtriple=mips -mcpu=generic -filetype=obj < %s \4; RUN: | llvm-readelf -A - | FileCheck %s --check-prefix=GENERIC5; GENERIC: ISA: MIPS326 7; RUN: llc -mtriple=mips -mcpu=mips1 -filetype=obj < %s \8; RUN: | llvm-readelf -A - | FileCheck %s --check-prefix=MIPS19; MIPS1: ISA: MIPS110; RUN: llc -mtriple=mips -mcpu=mips2 -filetype=obj < %s \11; RUN: | llvm-readelf -A - | FileCheck %s --check-prefix=MIPS212; MIPS2: ISA: MIPS213; RUN: llc -mtriple=mips64 -mcpu=mips3 -filetype=obj < %s \14; RUN: | llvm-readelf -A - | FileCheck %s --check-prefix=MIPS315; MIPS3: ISA: MIPS316; RUN: llc -mtriple=mips64 -mcpu=mips4 -filetype=obj < %s \17; RUN: | llvm-readelf -A - | FileCheck %s --check-prefix=MIPS418; MIPS4: ISA: MIPS419 20; RUN: llc -mtriple=mips -mcpu=mips32 -filetype=obj < %s \21; RUN: | llvm-readelf -A - | FileCheck %s --check-prefix=MIPS3222; MIPS32: ISA: MIPS3223; RUN: llc -mtriple=mips -mcpu=mips32r2 -filetype=obj < %s \24; RUN: | llvm-readelf -A - | FileCheck %s --check-prefix=MIPS32R225; MIPS32R2: ISA: MIPS32r226; RUN: llc -mtriple=mips -mcpu=mips32r3 -filetype=obj < %s \27; RUN: | llvm-readelf -A - | FileCheck %s --check-prefix=MIPS32R328; MIPS32R3: ISA: MIPS32r329; RUN: llc -mtriple=mips -mcpu=mips32r5 -filetype=obj < %s \30; RUN: | llvm-readelf -A - | FileCheck %s --check-prefix=MIPS32R531; MIPS32R5: ISA: MIPS32r532; RUN: llc -mtriple=mips -mcpu=mips32r6 -filetype=obj < %s \33; RUN: | llvm-readelf -A - | FileCheck %s --check-prefix=MIPS32R634; MIPS32R6: ISA: MIPS32r635 36; RUN: llc -mtriple=mips64 -mcpu=mips64 -filetype=obj < %s \37; RUN: | llvm-readelf -A - | FileCheck %s --check-prefix=MIPS6438; MIPS64: ISA: MIPS6439; RUN: llc -mtriple=mips64 -mcpu=mips64r2 -filetype=obj < %s \40; RUN: | llvm-readelf -A - | FileCheck %s --check-prefix=MIPS64R241; MIPS64R2: ISA: MIPS64r242; RUN: llc -mtriple=mips64 -mcpu=mips64r3 -filetype=obj < %s \43; RUN: | llvm-readelf -A - | FileCheck %s --check-prefix=MIPS64R344; MIPS64R3: ISA: MIPS64r345; RUN: llc -mtriple=mips64 -mcpu=mips64r5 -filetype=obj < %s \46; RUN: | llvm-readelf -A - | FileCheck %s --check-prefix=MIPS64R547; MIPS64R5: ISA: MIPS64r548; RUN: llc -mtriple=mips64 -mcpu=mips64r6 -filetype=obj < %s \49; RUN: | llvm-readelf -A - | FileCheck %s --check-prefix=MIPS64R650; MIPS64R6: ISA: MIPS64r651 52; RUN: llc -mtriple=mips64 -mcpu=octeon -filetype=obj < %s \53; RUN: | llvm-readelf -A - | FileCheck %s --check-prefix=OCTEON54; OCTEON: ISA: MIPS64r255; OCTEON: ISA Extension: Cavium Networks Octeon56; RUN: llc -mtriple=mips64 -mcpu=octeon+ -filetype=obj < %s \57; RUN: | llvm-readelf -A - | FileCheck %s --check-prefix=OCTEONP58; OCTEONP: ISA: MIPS64r259; OCTEONP: ISA Extension: Cavium Networks OcteonP60 61; Check that we reject CPUs that are not implemented.62 63; RUN: not llc < %s -o /dev/null -mtriple=mips64 -mcpu=mips5 2>&1 \64; RUN: | FileCheck %s --check-prefix=ERROR65 66; ERROR: LLVM ERROR: Code generation for MIPS-{{.}} is not implemented67 68define void @foo() {69 ret void70}71