diff options
author | Dan Gohman <gohman@apple.com> | 2009-01-22 21:58:43 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-01-22 21:58:43 +0000 |
commit | 1f3411de47805b1cd44b4734b19e032cbdc2b8c7 (patch) | |
tree | 16b219c2a56d5cff053aafab565df6177052ca59 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | f4013373cd9919fb7f4425ad549e4fdf0c875fba (diff) | |
download | bcm5719-llvm-1f3411de47805b1cd44b4734b19e032cbdc2b8c7.tar.gz bcm5719-llvm-1f3411de47805b1cd44b4734b19e032cbdc2b8c7.zip |
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.
llvm-svn: 62789
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions