add a note
[oota-llvm.git] / lib / Target / README.txt
index d61473136f652bddb2de3df99b431caeeec57642..c369c8f2434cca7dc1bb87592d1f35edcb0be7c8 100644 (file)
@@ -22,14 +22,6 @@ loads from the static array.
 Get the C front-end to expand hypot(x,y) -> llvm.sqrt(x*x+y*y) when errno and
 precision don't matter (ffastmath).  Misc/mandel will like this. :)
 
-===-------------------------------------------------------------------------===
-
-For all targets, not just X86:
-When llvm.memcpy, llvm.memset, or llvm.memmove are lowered, they should be 
-optimized to a few store instructions if the source is constant and the length
-is smallish (< 8). This will greatly help some tests like Shootout/strcat.c
-and fldry.
-
 //===---------------------------------------------------------------------===//
 
 Solve this DAG isel folding deficiency:
@@ -76,3 +68,41 @@ int %test(int %A) {
 This sort of thing occurs in the alloca lowering code and other places that
 are generating alignment of an already aligned value.
 
+//===---------------------------------------------------------------------===//
+
+Turn this into a signed shift right in instcombine:
+
+int f(unsigned x) {
+  return x >> 31 ? -1 : 0;
+}
+
+http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25600
+http://gcc.gnu.org/ml/gcc-patches/2006-02/msg01492.html
+
+//===---------------------------------------------------------------------===//
+
+We should reassociate:
+int f(int a, int b){ return a * a + 2 * a * b + b * b; }
+into:
+int f(int a, int b) { return a * (a + 2 * b) + b * b; }
+to eliminate a multiply.
+
+//===---------------------------------------------------------------------===//
+
+On targets with expensive 64-bit multiply, we could LSR this:
+
+for (i = ...; ++i) {
+   x = 1ULL << i;
+
+into:
+ long long tmp = 1;
+ for (i = ...; ++i, tmp+=tmp)
+   x = tmp;
+
+This would be a win on ppc32, but not x86 or ppc64.
+
+//===---------------------------------------------------------------------===//
+
+Shrink: (setlt (loadi32 P), 0) -> (setlt (loadi8 Phi), 0)
+
+//===---------------------------------------------------------------------===//