From: Zoran Jovanovic Date: Thu, 28 Jan 2016 11:08:03 +0000 (+0000) Subject: [mips][microMIPS] Disable FastISel for microMIPS X-Git-Tag: llvmorg-3.9.0-rc1~15752 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=838eabcd46b7518d87bbdc583a929e9c3bcd3a98;p=platform%2Fupstream%2Fllvm.git [mips][microMIPS] Disable FastISel for microMIPS Author: milena.vujosevic.janicic Reviewers: dsanders FastIsel is not supported for microMIPS, thus it needs to be disabled. Test micromips-zero-mat-uses.ll is deleted since the tested sequence of instructions is not generated for microMIPS without FastISel. Differential Revision: http://reviews.llvm.org/D15892 llvm-svn: 259039 --- diff --git a/llvm/lib/Target/Mips/MipsFastISel.cpp b/llvm/lib/Target/Mips/MipsFastISel.cpp index 8bbe3d4..d8ac6d6 100644 --- a/llvm/lib/Target/Mips/MipsFastISel.cpp +++ b/llvm/lib/Target/Mips/MipsFastISel.cpp @@ -192,7 +192,8 @@ public: TII(*Subtarget->getInstrInfo()), TLI(*Subtarget->getTargetLowering()) { MFI = funcInfo.MF->getInfo(); Context = &funcInfo.Fn->getContext(); - bool ISASupported = !Subtarget->hasMips32r6() && Subtarget->hasMips32(); + bool ISASupported = !Subtarget->hasMips32r6() && + !Subtarget->inMicroMipsMode() && Subtarget->hasMips32(); TargetSupported = ISASupported && (TM.getRelocationModel() == Reloc::PIC_) && (static_cast(TM).getABI().IsO32()); diff --git a/llvm/test/CodeGen/Mips/Fast-ISel/check-disabled-mcpus.ll b/llvm/test/CodeGen/Mips/Fast-ISel/check-disabled-mcpus.ll index 203e5a7..00a2781 100644 --- a/llvm/test/CodeGen/Mips/Fast-ISel/check-disabled-mcpus.ll +++ b/llvm/test/CodeGen/Mips/Fast-ISel/check-disabled-mcpus.ll @@ -7,6 +7,8 @@ ; RUN: llc -march=mips -mcpu=mips32r6 -O0 -relocation-model=pic \ ; RUN: -fast-isel-verbose <%s 2>&1 | FileCheck %s +; RUN: llc -march=mips -mcpu=mips32r2 -mattr=+micromips -O0 -relocation-model=pic \ +; RUN: -fast-isel-verbose <%s 2>&1 | FileCheck %s ; RUN: llc -march=mips -mcpu=mips64 -O0 -relocation-model=pic \ ; RUN: -fast-isel-verbose <%s 2>&1 | FileCheck %s diff --git a/llvm/test/CodeGen/Mips/micromips-zero-mat-uses.ll b/llvm/test/CodeGen/Mips/micromips-zero-mat-uses.ll deleted file mode 100644 index b38747a..0000000 --- a/llvm/test/CodeGen/Mips/micromips-zero-mat-uses.ll +++ /dev/null @@ -1,8 +0,0 @@ -; RUN: llc -march=mips -mcpu=mips32r2 -mattr=+micromips,+nooddspreg -O0 < %s | FileCheck %s - -; CHECK: addiu $[[R0:[0-9]+]], $zero, 0 -; CHECK: subu16 $2, $[[R0]], ${{[0-9]+}} -define i32 @foo() { - %1 = sub i32 0, undef - ret i32 %1 -}