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

Chris Lattner lattner at cs.uiuc.edu
Thu Apr 20 11:49:39 PDT 2006



Changes in directory llvm/lib/Target:

README.txt updated: 1.28 -> 1.29
---
Log message:

add a note


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

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


Index: llvm/lib/Target/README.txt
diff -u llvm/lib/Target/README.txt:1.28 llvm/lib/Target/README.txt:1.29
--- llvm/lib/Target/README.txt:1.28	Sat Apr  1 19:47:20 2006
+++ llvm/lib/Target/README.txt	Thu Apr 20 13:49:28 2006
@@ -172,3 +172,21 @@
 target!
 
 //===---------------------------------------------------------------------===//
+
+Consider this:
+
+unsigned short swap_16(unsigned short v) { return (v>>8) | (v<<8); }
+
+Compiled with the ppc backend:
+
+_swap_16:
+        slwi r2, r3, 8
+        srwi r3, r3, 8
+        or r2, r3, r2
+        rlwinm r3, r2, 0, 16, 31
+        blr
+
+The rlwinm (an and by 65535) is dead.  The dag combiner should propagate bits
+better than that to see this.
+
+//===---------------------------------------------------------------------===//






More information about the llvm-commits mailing list