summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-03-22 05:33:23 +0000
committerChris Lattner <sabre@nondot.org>2006-03-22 05:33:23 +0000
commiteccf46950cc80d3fd9201c9fa53d52a5a0e81ac2 (patch)
treeeeca1883c1599cd4ac3adc416b46620921ebd2f0 /llvm/lib
parent4a66d69433be88bb5f42c63b2a684c286898cea4 (diff)
downloadbcm5719-llvm-eccf46950cc80d3fd9201c9fa53d52a5a0e81ac2.tar.gz
bcm5719-llvm-eccf46950cc80d3fd9201c9fa53d52a5a0e81ac2.zip
This has been implemented. Tweak it into another note
llvm-svn: 26944
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/PowerPC/README.txt32
1 files changed, 9 insertions, 23 deletions
diff --git a/llvm/lib/Target/PowerPC/README.txt b/llvm/lib/Target/PowerPC/README.txt
index c90343eeee4..c9fba7fed47 100644
--- a/llvm/lib/Target/PowerPC/README.txt
+++ b/llvm/lib/Target/PowerPC/README.txt
@@ -552,34 +552,20 @@ When -ffast-math is on, we can use 0.0.
float foo(float X) { return (int)(X); }
-Currently produces
+Currently produces:
_foo:
- lis r2, ha16(LCPI1_0)
- lis r3, 17200
fctiwz f0, f1
stfd f0, -8(r1)
- lwz r4, -4(r1)
- xoris r4, r4, 32768
- stw r4, -12(r1)
- stw r3, -16(r1)
- lfs f0, lo16(LCPI1_0)(r2)
- lfd f1, -16(r1)
- fsub f0, f1, f0
+ lwz r2, -4(r1)
+ extsw r2, r2
+ std r2, -16(r1)
+ lfd f0, -16(r1)
+ fcfid f0, f0
frsp f1, f0
blr
-When we have ppc64 working properly, it could produce the nicer code:
-
-_foo:
- fctiwz f0, f1
- stfd f0, -8(r1)
- lwz r4, -4(r1)
- extsh r4, r4
- std r4, -16(r1)
- lfd f1, -16(r1)
- fcfid f0, f0
- frsp f0, f0
- blr
+We could use a target dag combine to turn the lwz/extsw into an lwa when the
+lwz has a single use. Since LWA is cracked anyway, this would be a codesize
+win only.
-Note: this would speed up SingleSource/Misc/pi by about 30%
OpenPOWER on IntegriCloud