Index: llvm/test/CodeGen/Mips/cpus-not-implemented.ll =================================================================== --- /dev/null +++ llvm/test/CodeGen/Mips/cpus-not-implemented.ll @@ -0,0 +1,9 @@ +; Check that we reject CPUs that are not implemented. +; CHECK-ERROR-NOT-IMPLEMENTED: LLVM ERROR: Code generation for MIPS-{{.}} is not implemented + +; RUN: not llc < %s -o /dev/null -mtriple=mips-unknown-unknown -mcpu=mips1 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR-NOT-IMPLEMENTED +; RUN: not llc < %s -o /dev/null -mtriple=mips64-unknown-unknown -mcpu=mips5 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR-NOT-IMPLEMENTED + +define void @foo() { + ret void +} Index: llvm/test/CodeGen/Mips/cpus.ll =================================================================== --- /dev/null +++ llvm/test/CodeGen/Mips/cpus.ll @@ -0,0 +1,25 @@ +; Test that the CPU names work. +; CHECK-NO-ERROR-NOT: not a recognized processor for this target + +; RUN: llc < %s -o /dev/null -mtriple=mips-unknown-unknown -mcpu=mips2 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty +; RUN: llc < %s -o /dev/null -mtriple=mips64-unknown-unknown -mcpu=mips3 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty +; RUN: llc < %s -o /dev/null -mtriple=mips64-unknown-unknown -mcpu=mips4 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty + +; RUN: llc < %s -o /dev/null -mtriple=mips-unknown-unknown -mcpu=mips32 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty +; RUN: llc < %s -o /dev/null -mtriple=mips-unknown-unknown -mcpu=mips32r2 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty +; RUN: llc < %s -o /dev/null -mtriple=mips-unknown-unknown -mcpu=mips32r3 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty +; RUN: llc < %s -o /dev/null -mtriple=mips-unknown-unknown -mcpu=mips32r5 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty +; RUN: llc < %s -o /dev/null -mtriple=mips-unknown-unknown -mcpu=mips32r6 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty + +; RUN: llc < %s -o /dev/null -mtriple=mips64-unknown-unknown -mcpu=mips64 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty +; RUN: llc < %s -o /dev/null -mtriple=mips64-unknown-unknown -mcpu=mips64r2 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty +; RUN: llc < %s -o /dev/null -mtriple=mips64-unknown-unknown -mcpu=mips64r3 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty +; RUN: llc < %s -o /dev/null -mtriple=mips64-unknown-unknown -mcpu=mips64r5 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty +; RUN: llc < %s -o /dev/null -mtriple=mips64-unknown-unknown -mcpu=mips64r6 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty + +; RUN: llc < %s -o /dev/null -mtriple=mips64-unknown-unknown -mcpu=octeon 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty +; RUN: llc < %s -o /dev/null -mtriple=mips64-unknown-unknown -mcpu=octeon+ 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty + +define void @foo() { + ret void +}