aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-12-28 04:42:05 +0000
committerChris Lattner <sabre@nondot.org>2007-12-28 04:42:05 +0000
commit166a268656c6e0e2f32c92f7bc021286ad669c9a (patch)
treef4cdd41aa907dabaf11a806e0fb391e1d8f7d29c
parent650d5053bfb388bc81aecd202f16d2e128e1f23e (diff)
downloadexternal_llvm-166a268656c6e0e2f32c92f7bc021286ad669c9a.zip
external_llvm-166a268656c6e0e2f32c92f7bc021286ad669c9a.tar.gz
external_llvm-166a268656c6e0e2f32c92f7bc021286ad669c9a.tar.bz2
add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45377 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/README.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/Target/README.txt b/lib/Target/README.txt
index 37c0a35..b94bdea 100644
--- a/lib/Target/README.txt
+++ b/lib/Target/README.txt
@@ -464,3 +464,22 @@ entry:
}
//===---------------------------------------------------------------------===//
+
+"basicaa" should know how to look through "or" instructions that act like add
+instructions. For example in this code, the x*4+1 is turned into x*4 | 1, and
+basicaa can't analyze the array subscript, leading to duplicated loads in the
+generated code:
+
+void test(int X, int Y, int a[]) {
+int i;
+ for (i=2; i<1000; i+=4) {
+ a[i+0] = a[i-1+0]*a[i-2+0];
+ a[i+1] = a[i-1+1]*a[i-2+1];
+ a[i+2] = a[i-1+2]*a[i-2+2];
+ a[i+3] = a[i-1+3]*a[i-2+3];
+ }
+}
+
+
+
+//===---------------------------------------------------------------------===//