Implement CopyFromReg, TokenFactor, and fix a bug in CopyToReg. This allows
authorChris Lattner <sabre@nondot.org>
Fri, 19 Aug 2005 21:43:53 +0000 (21:43 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 19 Aug 2005 21:43:53 +0000 (21:43 +0000)
commit7ef330478ff7f87fece5144ebeb5783894fa3f33
tree69e55072c09a584feeac5694c2d02a951e757670
parentfa164b61d11a3fe4056c8e9b97209bfda6c0b61b
Implement CopyFromReg, TokenFactor, and fix a bug in CopyToReg.  This allows
us to compile stuff like this:

double %test(double %A, double %B, double %C, double %E) {
        %F = mul double %A, %A
        %G = add double %F, %B
        %H = sub double -0.0, %G
        %I = mul double %H, %C
        %J = add double %I, %E
        ret double %J
}

to:

_test:
        fnmadd f0, f1, f1, f2
        fmadd f1, f0, f3, f4
        blr

woot!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22937 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/ScheduleDAG.cpp