Cleanup and improve PPC fsel generation
authorHal Finkel <hfinkel@anl.gov>
Sun, 7 Apr 2013 22:11:09 +0000 (22:11 +0000)
committerHal Finkel <hfinkel@anl.gov>
Sun, 7 Apr 2013 22:11:09 +0000 (22:11 +0000)
commit59889f7f496f549965764820a0150c4068c02f5b
treec102ec3be805ebafe070e2691aa3eab133a5c53d
parentcd3d60c4505efad809a3d8b4ba9aed315568f8d8
Cleanup and improve PPC fsel generation

First, we should not cheat: fsel-based lowering of select_cc is a
finite-math-only optimization (the ISA manual, section F.3 of v2.06, makes
this clear, as does a note in our own README).

This also adds fsel-based lowering of EQ and NE condition codes. As it turned
out, fsel generation was covered by a grand total of zero regression test
cases. I've added some test cases to cover the existing behavior (which is now
finite-math only), as well as the new EQ cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179000 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCISelLowering.cpp
test/CodeGen/PowerPC/fsel.ll [new file with mode: 0644]