[llvm-commits] CVS: llvm/lib/Target/PowerPC/README.txt
Nate Begeman
natebegeman at mac.com
Thu Feb 2 21:17:17 PST 2006
Changes in directory llvm/lib/Target/PowerPC:
README.txt updated: 1.57 -> 1.58
---
Log message:
Flesh out a couple of the items in the README
---
Diffs of the changes: (+41 -14)
README.txt | 55 +++++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 41 insertions(+), 14 deletions(-)
Index: llvm/lib/Target/PowerPC/README.txt
diff -u llvm/lib/Target/PowerPC/README.txt:1.57 llvm/lib/Target/PowerPC/README.txt:1.58
--- llvm/lib/Target/PowerPC/README.txt:1.57 Thu Feb 2 19:49:49 2006
+++ llvm/lib/Target/PowerPC/README.txt Thu Feb 2 23:17:06 2006
@@ -2,20 +2,17 @@
* gpr0 allocation
* implement do-loop -> bdnz transform
* implement powerpc-64 for darwin
-* use stfiwx in float->int
-* Fold add and sub with constant into non-extern, non-weak addresses so this:
- lis r2, ha16(l2__ZTV4Cell)
- la r2, lo16(l2__ZTV4Cell)(r2)
- addi r2, r2, 8
-becomes:
- lis r2, ha16(l2__ZTV4Cell+8)
- la r2, lo16(l2__ZTV4Cell+8)(r2)
+===-------------------------------------------------------------------------===
+
+Use the stfiwx instruction for:
+void foo(float a, int *b) { *b = a; }
+
+===-------------------------------------------------------------------------===
-* Teach LLVM how to codegen this:
unsigned short foo(float a) { return a; }
-as:
+should be:
_foo:
fctiwz f0,f1
stfd f0,-8(r1)
@@ -29,11 +26,15 @@
rlwinm r3, r2, 0, 16, 31
blr
-* Support 'update' load/store instructions. These are cracked on the G5, but
- are still a codesize win.
+===-------------------------------------------------------------------------===
+
+Support 'update' load/store instructions. These are cracked on the G5, but are
+still a codesize win.
+
+===-------------------------------------------------------------------------===
-* should hint to the branch select pass that it doesn't need to print the
- second unconditional branch, so we don't end up with things like:
+Should hint to the branch select pass that it doesn't need to print the second
+unconditional branch, so we don't end up with things like:
b .LBBl42__2E_expand_function_8_674 ; loopentry.24
b .LBBl42__2E_expand_function_8_42 ; NewDefault
b .LBBl42__2E_expand_function_8_42 ; NewDefault
@@ -475,3 +476,29 @@
Get the C front-end to expand hypot(x,y) -> llvm.sqrt(x*x+y*y) when errno and
precision don't matter (ffastmath). Misc/mandel will like this. :)
+===-------------------------------------------------------------------------===
+
+Fold add and sub with constant into non-extern, non-weak addresses so this:
+
+static int a;
+void bar(int b) { a = b; }
+void foo(unsigned char *c) {
+ *c = a;
+}
+
+So that
+
+_foo:
+ lis r2, ha16(_a)
+ la r2, lo16(_a)(r2)
+ lbz r2, 3(r2)
+ stb r2, 0(r3)
+ blr
+
+Becomes
+
+_foo:
+ lis r2, ha16(_a+3)
+ lbz r2, lo16(_a+3)(r2)
+ stb r2, 0(r3)
+ blr
More information about the llvm-commits
mailing list