[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)
commite741eb2c7d85b0884d68e856f4391341a6c6f7e3
treedbeb951107b2da8de51ca80b7dc49e3ace1273ba
parent00b7f95b122372d57b7d3f00ae435512024bb45e
[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

llvm-svn: 230956
llvm/lib/Target/Mips/MipsISelLowering.cpp
llvm/test/CodeGen/Mips/fcmp.ll