Fix a serious performance regression introduced by r108687 on linux:
authorChris Lattner <sabre@nondot.org>
Tue, 7 Sep 2010 20:01:38 +0000 (20:01 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 7 Sep 2010 20:01:38 +0000 (20:01 +0000)
commit979ed44feb1be70e641275aaef5460320fab86a3
tree4c8b7cb5ad9020dd64c16e19807b41574acb0012
parentdc0b06c8150071f75597a97d43529a5227031858
Fix a serious performance regression introduced by r108687 on linux:
turning (fptrunc (sqrt (fpext x))) -> (sqrtf x)  is great, but we have
to delete the original sqrt as well.  Not doing so causes us to do
two sqrt's when building with -fmath-errno (the default on linux).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113260 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineCasts.cpp
test/Transforms/InstCombine/sqrt.ll