aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Target/README.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/Target/README.txt b/lib/Target/README.txt
index 1ab1f16c71..2ce2575d1c 100644
--- a/lib/Target/README.txt
+++ b/lib/Target/README.txt
@@ -86,3 +86,18 @@ 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.
+