diff options
author | Chris Lattner <sabre@nondot.org> | 2006-01-31 02:55:28 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-01-31 02:55:28 +0000 |
commit | 56b6964473cb0e69a8739e6c7e20239c2f19e8f7 (patch) | |
tree | 69c0ba50db6d1d0a6ee68ce4d95af88d392d27fd | |
parent | b716343851c2e38a6df423c8efba998f577521e5 (diff) |
add the 'lucas' optimization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25830 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/PowerPC/README.txt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/README.txt b/lib/Target/PowerPC/README.txt index 3d0736d65e..b23b9a4cc4 100644 --- a/lib/Target/PowerPC/README.txt +++ b/lib/Target/PowerPC/README.txt @@ -402,3 +402,28 @@ Implement TargetConstantVec, and set up PPC to custom lower ConstantVec into TargetConstantVec's if it's one of the many forms that are algorithmically computable using the spiffy altivec instructions. +===-------------------------------------------------------------------------=== + +Compile this: + +double %test(double %X) { + %Y = cast double %X to long + %Z = cast long %Y to double + ret double %Z +} + +to this: + +_test: + fctidz f0, f1 + stfd f0, -8(r1) + lwz r2, -4(r1) + lwz r3, -8(r1) + stw r2, -12(r1) + stw r3, -16(r1) + lfd f0, -16(r1) + fcfid f1, f0 + blr + +without the lwz/stw's. + |