[mips] Optimize conditional moves where RHS is zero.
authorVasileios Kalintiris <Vasileios.Kalintiris@imgtec.com>
Mon, 2 Mar 2015 12:47:32 +0000 (12:47 +0000)
committerVasileios Kalintiris <Vasileios.Kalintiris@imgtec.com>
Mon, 2 Mar 2015 12:47:32 +0000 (12:47 +0000)
commit5a393cab699e74fa318750b6d7508e64b386a866
tree1d49f2cf2c698b6ee93a5ff3e4e7deb0c2fc3689
parente206743835cf232a6629d54cf1d0e5d6ed87bf6d
[mips] Optimize conditional moves where RHS is zero.

Summary:
When the RHS of a conditional move node is zero, we can utilize the $zero
register by inverting the conditional move instruction and by swapping the
order of its True/False operands.

Reviewers: dsanders

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230956 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Mips/MipsISelLowering.cpp
test/CodeGen/Mips/fcmp.ll