Dan Gohman 760f86f339 Don't create ISD::FNEG nodes after legalize if they aren't legal.
Simplify x+0 to x in unsafe-fp-math mode. This avoids a bunch of
redundant work in many cases, because in unsafe-fp-math mode,
ISD::FADD with a constant is considered free to negate, so the
DAGCombiner often negates x+0 to -0-x thinking it's free, when
in reality the end result is -x, which is more expensive than x.

Also, combine x*0 to 0.

This fixes PR3374.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62789 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-22 21:58:43 +00:00
..
2009-01-15 20:18:42 +00:00
2008-06-16 04:25:39 +00:00
2008-11-26 02:21:12 +00:00
2009-01-05 08:14:35 +00:00
2009-01-21 13:04:00 +00:00
2008-10-15 22:34:34 +00:00
2009-01-22 07:08:58 +00:00
2008-07-28 18:41:03 +00:00