[mips] Support SELECT nodes for targets that don't have conditional-move instructions.
authorVasileios Kalintiris <Vasileios.Kalintiris@imgtec.com>
Fri, 12 Dec 2014 14:41:37 +0000 (14:41 +0000)
committerVasileios Kalintiris <Vasileios.Kalintiris@imgtec.com>
Fri, 12 Dec 2014 14:41:37 +0000 (14:41 +0000)
commit31f9936bf560efba67a6bbb21d15e70f58d9d58a
tree9a873025d6e480691e4a11756ad96adbe4f45542
parent97996ea79022e2a22f953293231b64b2b70e90a0
[mips] Support SELECT nodes for targets that don't have conditional-move instructions.

Summary:
For Mips targets that do not have conditional-move instructions, ie. targets
before MIPS32 and MIPS-IV, we have to insert a diamond control-flow
pattern in order to support SELECT nodes. In order to do that, we add
pseudo-instructions with a custom inserter that emits the necessary
control-flow that selects the correct value.

With this patch we add complete support for code generation of Mips-II targets
based on the LLVM test-suite.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6212

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224124 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Mips/MipsCondMov.td
lib/Target/Mips/MipsISelLowering.cpp
lib/Target/Mips/MipsISelLowering.h
lib/Target/Mips/MipsInstrInfo.td
test/CodeGen/Mips/llvm-ir/select.ll [new file with mode: 0644]