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

Chris Lattner lattner at cs.uiuc.edu
Mon Jan 16 09:53:12 PST 2006



Changes in directory llvm/lib/Target/PowerPC:

README.txt updated: 1.43 -> 1.44
---
Log message:

transfer some notes from my email to somewhere useful.


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

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


Index: llvm/lib/Target/PowerPC/README.txt
diff -u llvm/lib/Target/PowerPC/README.txt:1.43 llvm/lib/Target/PowerPC/README.txt:1.44
--- llvm/lib/Target/PowerPC/README.txt:1.43	Fri Jan 13 19:24:22 2006
+++ llvm/lib/Target/PowerPC/README.txt	Mon Jan 16 11:53:00 2006
@@ -225,3 +225,29 @@
 void xxx(struct foo F);
 void bar() { struct foo R = { 1.0, 2.0 }; xxx(R); }
 
+===-------------------------------------------------------------------------===
+
+For this:
+
+int h(int i, int j, int k) {
+ return (i==0||j==0||k == 0);
+}
+
+We currently emit this:
+
+_h:
+        cntlzw r2, r3
+        cntlzw r3, r4
+        cntlzw r4, r5
+        srwi r2, r2, 5
+        srwi r3, r3, 5
+        srwi r4, r4, 5
+        or r2, r3, r2
+        or r3, r2, r4
+        blr
+
+The ctlz/shift instructions are created by the isel, so the dag combiner doesn't
+have a chance to pull the shifts through the or's (eliminating two 
+instructions).  SETCC nodes should be custom lowered in this case, not expanded
+by the isel.
+






More information about the llvm-commits mailing list