summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-12-22 17:19:28 +0000
committerChris Lattner <sabre@nondot.org>2005-12-22 17:19:28 +0000
commitffe35427265b71569a7180d2d7c80ef3e86c7168 (patch)
treea7935ab22229fc915748b6476b119c721c242082 /llvm/lib
parent644e7db8182e9cc57896c536671e1ebd02ac0509 (diff)
downloadbcm5719-llvm-ffe35427265b71569a7180d2d7c80ef3e86c7168.tar.gz
bcm5719-llvm-ffe35427265b71569a7180d2d7c80ef3e86c7168.zip
move some random notes out of my email into someplace useful
llvm-svn: 24956
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/PowerPC/README.txt32
1 files changed, 32 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/README.txt b/llvm/lib/Target/PowerPC/README.txt
index 2897655d2d0..58805562a87 100644
--- a/llvm/lib/Target/PowerPC/README.txt
+++ b/llvm/lib/Target/PowerPC/README.txt
@@ -241,3 +241,35 @@ _test:
--> 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); }
+
OpenPOWER on IntegriCloud