[llvm-commits] CVS: llvm/lib/Target/PowerPC/README.txt

Chris Lattner lattner at cs.uiuc.edu
Thu Dec 22 09:19:40 PST 2005



Changes in directory llvm/lib/Target/PowerPC:

README.txt updated: 1.40 -> 1.41
---
Log message:

move some random notes out of my email into someplace useful


---
Diffs of the changes:  (+32 -0)

 README.txt |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+)


Index: llvm/lib/Target/PowerPC/README.txt
diff -u llvm/lib/Target/PowerPC/README.txt:1.40 llvm/lib/Target/PowerPC/README.txt:1.41
--- llvm/lib/Target/PowerPC/README.txt:1.40	Thu Dec  8 01:13:28 2005
+++ llvm/lib/Target/PowerPC/README.txt	Thu Dec 22 11:19:28 2005
@@ -241,3 +241,35 @@
 
 --> important for C++.
 
+===-------------------------------------------------------------------------===
+
+int test3(int a, int b) { return (a < 0) ? a : 0; }
+
+should be branch free code.  LLVM is turning it into < 1 because of the RHS.
+
+===-------------------------------------------------------------------------===
+
+For this testcase:
+int f1(int a, int b) { return (a&0xF)|(b&0xF0); }
+
+We currently emit:
+_f1:
+        rlwinm r2, r4, 0, 24, 27
+        rlwimi r2, r3, 0, 28, 31
+        or r3, r2, r2
+        blr
+
+We could emit:
+_f1:
+        rlwinm r4, r4, 0, 24, 27
+        rlwimi r3, r4, 0, 0, 27
+        blr
+
+===-------------------------------------------------------------------------===
+
+No loads or stores of the constants should be needed:
+
+struct foo { double X, Y; };
+void xxx(struct foo F);
+void bar() { struct foo R = { 1.0, 2.0 }; xxx(R); }
+






More information about the llvm-commits mailing list