summaryrefslogtreecommitdiff
path: root/lib/Target/README.txt
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2010-12-23 15:32:07 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2010-12-23 15:32:07 +0000
commit9d071cbb92e2f28be2067fdb5cf21b396e34838d (patch)
tree12e347e5fcaf21c5bfca663518c93c246bb8da3d /lib/Target/README.txt
parent3e4106105b29e1aad922bb3fbd24a1a8b0144457 (diff)
downloadllvm-9d071cbb92e2f28be2067fdb5cf21b396e34838d.tar.gz
llvm-9d071cbb92e2f28be2067fdb5cf21b396e34838d.tar.bz2
llvm-9d071cbb92e2f28be2067fdb5cf21b396e34838d.tar.xz
Remove/fix invalid README entries. The well thought out strcpy function doesn't return a pointer to the end of the string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122496 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/README.txt')
-rw-r--r--lib/Target/README.txt23
1 files changed, 2 insertions, 21 deletions
diff --git a/lib/Target/README.txt b/lib/Target/README.txt
index abb8ee6f49..c9561660b1 100644
--- a/lib/Target/README.txt
+++ b/lib/Target/README.txt
@@ -697,7 +697,7 @@ implementations of ceil/floor/rint.
Consider:
int test() {
- long long input[8] = {1,1,1,1,1,1,1,1};
+ long long input[8] = {1,0,1,0,1,0,1,0};
foo(input);
}
@@ -1432,14 +1432,7 @@ Those should be turned into a switch.
This is interesting for a couple reasons. First, in this:
- %3073 = call i8* @strcpy(i8* %3072, i8* %3071) nounwind
- %strlen = call i32 @strlen(i8* %3072)
-
-The strlen could be replaced with: %strlen = sub %3072, %3073, because the
-strcpy call returns a pointer to the end of the string. Based on that, the
-endptr GEP just becomes equal to 3073, which eliminates a strlen call and GEP.
-
-Second, the memcpy+strlen strlen can be replaced with:
+The memcpy+strlen strlen can be replaced with:
%3074 = call i32 @strlen([5 x i8]* @"\01LC42") nounwind readonly
@@ -1515,18 +1508,6 @@ This pattern repeats several times, basically doing:
//===---------------------------------------------------------------------===//
-186.crafty also contains this code:
-
-%1906 = call i32 @strlen(i8* getelementptr ([32 x i8]* @pgn_event, i32 0,i32 0))
-%1907 = getelementptr [32 x i8]* @pgn_event, i32 0, i32 %1906
-%1908 = call i8* @strcpy(i8* %1907, i8* %1905) nounwind align 1
-%1909 = call i32 @strlen(i8* getelementptr ([32 x i8]* @pgn_event, i32 0,i32 0))
-%1910 = getelementptr [32 x i8]* @pgn_event, i32 0, i32 %1909
-
-The last strlen is computable as 1908-@pgn_event, which means 1910=1908.
-
-//===---------------------------------------------------------------------===//
-
186.crafty has this interesting pattern with the "out.4543" variable:
call void @llvm.memcpy.i32(