[mips][mips64r6] c.cond.fmt, mov[fntz], and mov[fntz].[ds] are not available on MIPS3...
authorDaniel Sanders <daniel.sanders@imgtec.com>
Thu, 12 Jun 2014 13:39:06 +0000 (13:39 +0000)
committerDaniel Sanders <daniel.sanders@imgtec.com>
Thu, 12 Jun 2014 13:39:06 +0000 (13:39 +0000)
commit8007133f3e6073688f494b2060488b14fc9834fa
treecdebad11f3b5fea11fbbdec7be85b87def92b88c
parent7a2514f0583431265c299de15790b787684d1ed2
[mips][mips64r6] c.cond.fmt, mov[fntz], and mov[fntz].[ds] are not available on MIPS32r6/MIPS64r6

Summary:
c.cond.fmt has been replaced by cmp.cond.fmt. Where c.cond.fmt wrote to
dedicated condition registers, cmp.cond.fmt writes 1 or 0 to normal FGR's
(like the GPR comparisons).

mov[fntz] have been replaced by seleqz and selnez. These instructions
conditionally zero a register based on a bool in a GPR. The results can
then be or'd together to act as a select without, for example, requiring a third
register read port.

mov[fntz].[ds] have been replaced with sel.[ds]

MIPS64r6 currently generates unnecessary sign-extensions for most selects.
This is because the result of a SETCC is currently an i32. Bits 32-63 are
undefined in i32 and the behaviour of seleqz/selnez would otherwise depend
on undefined bits. Later, we will fix this by making the result of SETCC an
i64 on MIPS64 targets.

Depends on D3958

Reviewers: jkolek, vmedic, zoran.jovanovic

Reviewed By: vmedic, zoran.jovanovic

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210777 91177308-0d34-0410-b5e6-96231b3b80d8
21 files changed:
lib/Target/Mips/Disassembler/MipsDisassembler.cpp
lib/Target/Mips/Mips32r6InstrInfo.td
lib/Target/Mips/Mips64InstrInfo.td
lib/Target/Mips/Mips64r6InstrInfo.td
lib/Target/Mips/MipsCondMov.td
lib/Target/Mips/MipsISelLowering.cpp
lib/Target/Mips/MipsISelLowering.h
lib/Target/Mips/MipsInstrFPU.td
lib/Target/Mips/MipsInstrInfo.td
lib/Target/Mips/MipsRegisterInfo.td
lib/Target/Mips/MipsSEISelLowering.cpp
test/CodeGen/Mips/cmov.ll
test/CodeGen/Mips/fcmp.ll [new file with mode: 0644]
test/CodeGen/Mips/mips64-f128.ll
test/CodeGen/Mips/select.ll
test/CodeGen/Mips/selectcc.ll
test/CodeGen/Mips/zeroreg.ll
test/MC/Mips/mips32r6/invalid-mips1.s
test/MC/Mips/mips32r6/invalid-mips32.s
test/MC/Mips/mips64r6/invalid-mips1.s
test/MC/Mips/mips64r6/invalid-mips64.s