Changes in directory llvm/lib/Target/PowerPC:

README.txt updated: 1.108 -> 1.109
---
Log message:

A relatively simple PPC optimization.


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

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


Index: llvm/lib/Target/PowerPC/README.txt
diff -u llvm/lib/Target/PowerPC/README.txt:1.108 
llvm/lib/Target/PowerPC/README.txt:1.109
--- llvm/lib/Target/PowerPC/README.txt:1.108    Mon Jan 29 15:21:22 2007
+++ llvm/lib/Target/PowerPC/README.txt  Wed Jan 31 13:49:20 2007
@@ -595,3 +595,30 @@
 it.
 
 ===-------------------------------------------------------------------------===
+
+We compile this:
+int test(_Bool X) {
+  return X ? 524288 : 0;
+}
+
+to: 
+_test:
+        cmplwi cr0, r3, 0
+        lis r2, 8
+        li r3, 0
+        beq cr0, LBB1_2 ;entry
+LBB1_1: ;entry
+        mr r3, r2
+LBB1_2: ;entry
+        blr 
+
+instead of:
+_test:
+        addic r2,r3,-1
+        subfe r0,r2,r3
+        slwi r3,r0,19
+        blr
+
+This sort of thing occurs a lot due to globalopt.
+
+===-------------------------------------------------------------------------===



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to