diff --git a/llvm/lib/Target/Mips/Mips.td b/llvm/lib/Target/Mips/Mips.td --- a/llvm/lib/Target/Mips/Mips.td +++ b/llvm/lib/Target/Mips/Mips.td @@ -232,6 +232,7 @@ class Proc Features> : ProcessorModel; +def : Proc<"generic", [FeatureMips32]>; def : Proc<"mips1", [FeatureMips1]>; def : Proc<"mips2", [FeatureMips2]>; def : Proc<"mips32", [FeatureMips32]>; diff --git a/llvm/test/CodeGen/Mips/cpus.ll b/llvm/test/CodeGen/Mips/cpus.ll --- a/llvm/test/CodeGen/Mips/cpus.ll +++ b/llvm/test/CodeGen/Mips/cpus.ll @@ -1,5 +1,9 @@ ; 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=mips2 -filetype=obj < %s \ ; RUN: | llvm-readelf -A | FileCheck %s --check-prefix=MIPS2 ; MIPS2: ISA: MIPS2