Index: lib/Target/Mips/MipsFastISel.cpp =================================================================== --- lib/Target/Mips/MipsFastISel.cpp +++ lib/Target/Mips/MipsFastISel.cpp @@ -61,7 +61,8 @@ MFI = funcInfo.MF->getInfo(); Context = &funcInfo.Fn->getContext(); TargetSupported = ((Subtarget->getRelocationModel() == Reloc::PIC_) && - (Subtarget->hasMips32r2() && (Subtarget->isABI_O32()))); + ((Subtarget->hasMips32r2() || Subtarget->hasMips32()) && + (Subtarget->isABI_O32()))); } bool fastSelectInstruction(const Instruction *I) override; Index: test/CodeGen/Mips/Fast-ISel/loadstore2.ll =================================================================== --- test/CodeGen/Mips/Fast-ISel/loadstore2.ll +++ test/CodeGen/Mips/Fast-ISel/loadstore2.ll @@ -6,6 +6,8 @@ @c1 = common global i8 0, align 1 ; RUN: llc -march=mipsel -relocation-model=pic -O0 -mips-fast-isel -fast-isel-abort -mcpu=mips32r2 \ ; RUN: < %s | FileCheck %s +; RUN: llc -march=mipsel -relocation-model=pic -O0 -mips-fast-isel -fast-isel-abort -mcpu=mips32 \ +; RUN: < %s | FileCheck %s @s2 = common global i16 0, align 2 @s1 = common global i16 0, align 2 Index: test/CodeGen/Mips/Fast-ISel/loadstrconst.ll =================================================================== --- test/CodeGen/Mips/Fast-ISel/loadstrconst.ll +++ test/CodeGen/Mips/Fast-ISel/loadstrconst.ll @@ -1,5 +1,7 @@ ; RUN: llc -march=mipsel -relocation-model=pic -O0 -mips-fast-isel -fast-isel-abort -mcpu=mips32r2 \ ; RUN: < %s | FileCheck %s +; RUN: llc -march=mipsel -relocation-model=pic -O0 -mips-fast-isel -fast-isel-abort -mcpu=mips32 \ +; RUN: < %s | FileCheck %s @.str = private unnamed_addr constant [6 x i8] c"hello\00", align 1 @s = common global i8* null, align 4 Index: test/CodeGen/Mips/Fast-ISel/nullvoid.ll =================================================================== --- test/CodeGen/Mips/Fast-ISel/nullvoid.ll +++ test/CodeGen/Mips/Fast-ISel/nullvoid.ll @@ -1,5 +1,7 @@ ; RUN: llc -march=mipsel -relocation-model=pic -O0 -mips-fast-isel -fast-isel-abort -mcpu=mips32r2 \ ; RUN: < %s | FileCheck %s +; RUN: llc -march=mipsel -relocation-model=pic -O0 -mips-fast-isel -fast-isel-abort -mcpu=mips32 \ +; RUN: < %s | FileCheck %s ; Function Attrs: nounwind define void @foo() { Index: test/CodeGen/Mips/Fast-ISel/simplestore.ll =================================================================== --- test/CodeGen/Mips/Fast-ISel/simplestore.ll +++ test/CodeGen/Mips/Fast-ISel/simplestore.ll @@ -1,5 +1,7 @@ ; RUN: llc -march=mipsel -relocation-model=pic -O0 -mips-fast-isel -fast-isel-abort -mcpu=mips32r2 \ ; RUN: < %s | FileCheck %s +; RUN: llc -march=mipsel -relocation-model=pic -O0 -mips-fast-isel -fast-isel-abort -mcpu=mips32 \ +; RUN: < %s | FileCheck %s @abcd = external global i32 Index: test/CodeGen/Mips/Fast-ISel/simplestorefp1.ll =================================================================== --- test/CodeGen/Mips/Fast-ISel/simplestorefp1.ll +++ test/CodeGen/Mips/Fast-ISel/simplestorefp1.ll @@ -1,5 +1,7 @@ ; RUN: llc -march=mipsel -relocation-model=pic -O0 -mips-fast-isel -fast-isel-abort -mcpu=mips32r2 \ ; RUN: < %s | FileCheck %s +; RUN: llc -march=mipsel -relocation-model=pic -O0 -mips-fast-isel -fast-isel-abort -mcpu=mips32 \ +; RUN: < %s | FileCheck %s @f = common global float 0.000000e+00, align 4 @de = common global double 0.000000e+00, align 8 Index: test/CodeGen/Mips/Fast-ISel/simplestorei.ll =================================================================== --- test/CodeGen/Mips/Fast-ISel/simplestorei.ll +++ test/CodeGen/Mips/Fast-ISel/simplestorei.ll @@ -1,5 +1,7 @@ ; RUN: llc -march=mipsel -relocation-model=pic -O0 -mips-fast-isel -fast-isel-abort -mcpu=mips32r2 \ ; RUN: < %s | FileCheck %s +; RUN: llc -march=mipsel -relocation-model=pic -O0 -mips-fast-isel -fast-isel-abort -mcpu=mips32 \ +; RUN: < %s | FileCheck %s @ijk = external global i32