Codegen FP adds and subtracts with a constant more efficiently, generating:
authorChris Lattner <sabre@nondot.org>
Sun, 11 Apr 2004 20:26:20 +0000 (20:26 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 11 Apr 2004 20:26:20 +0000 (20:26 +0000)
commit48b0c97e20305e234b8a27cc06b936829c745efe
tree00d5d5a89e26df26dc8065068c8dbf5bce91979e
parent490e86fed58ddf97234a3188cd4a8670251b66f7
Codegen FP adds and subtracts with a constant more efficiently, generating:

        fld QWORD PTR [%ESP + 4]
        fadd QWORD PTR [.CPItest_add_0]

instead of:

        fld QWORD PTR [%ESP + 4]
        fld QWORD PTR [.CPItest_add_0]
        faddp %ST(1)

I also intend to do this for mul & div, but it appears that I have to
refactor a bit of code before I can do so.

This is tested by: test/Regression/CodeGen/X86/fp_constant_op.llx

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12839 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/InstSelectSimple.cpp
lib/Target/X86/X86ISelSimple.cpp