move some random notes out of my email into someplace useful
authorChris Lattner <sabre@nondot.org>
Thu, 22 Dec 2005 17:19:28 +0000 (17:19 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 22 Dec 2005 17:19:28 +0000 (17:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24956 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PowerPC/README.txt

index 2897655d2d09a70e7a6551dfc1db904f08facabb..58805562a87e94776eb3802de9c4953d8cbd094c 100644 (file)
@@ -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); }
+