Index: lib/Target/Mips/MipsFastISel.cpp =================================================================== --- lib/Target/Mips/MipsFastISel.cpp +++ lib/Target/Mips/MipsFastISel.cpp @@ -17,7 +17,7 @@ namespace { -// All possible address modes, plus some. +// All possible address modes. typedef struct Address { enum { RegBase, FrameIndexBase } BaseType; @@ -96,6 +96,9 @@ bool MipsFastISel::isLoadTypeLegal(Type *Ty, MVT &VT) { if (isTypeLegal(Ty, VT)) return true; + // We will extend this in a later patch: + // If this is a type than can be sign or zero-extended to a basic operation + // go ahead and accept it now. return false; } @@ -205,7 +208,6 @@ return 0; const TargetRegisterClass *RC = &Mips::GPR32RegClass; unsigned DestReg = createResultReg(RC); - // FastISel TLS support on non-MachO is broken, punt to SelectionDAG. const GlobalVariable *GVar = dyn_cast(GV); bool IsThreadLocal = GVar && GVar->isThreadLocal(); if (IsThreadLocal) @@ -214,7 +216,6 @@ .addReg(MFI->getGlobalBaseReg()) .addGlobalAddress(GV, 0, MipsII::MO_GOT); return DestReg; - return 0; } unsigned MipsFastISel::MaterializeInt(const Constant *C, MVT VT) { if (VT != MVT::i32) Index: lib/Target/Mips/MipsISelLowering.cpp =================================================================== --- lib/Target/Mips/MipsISelLowering.cpp +++ lib/Target/Mips/MipsISelLowering.cpp @@ -54,7 +54,7 @@ cl::opt EnableMipsFastISel("mips-fast-isel", cl::Hidden, cl::desc("Allow mips-fast-isel to be used"), - cl::init(true)); + cl::init(false)); static const MCPhysReg O32IntRegs[4] = { Mips::A0, Mips::A1, Mips::A2, Mips::A3 Index: test/CodeGen/Mips/Fast-ISel/simplestore.ll =================================================================== --- test/CodeGen/Mips/Fast-ISel/simplestore.ll +++ test/CodeGen/Mips/Fast-ISel/simplestore.ll @@ -1,4 +1,4 @@ -; RUN: llc -march=mipsel -relocation-model=pic -O0 -fast-isel-abort -mcpu=mips32r2 \ +; RUN: llc -march=mipsel -relocation-model=pic -O0 -mips-fast-isel -fast-isel-abort -mcpu=mips32r2 \ ; RUN: < %s | FileCheck %s @abcd = external global i32