diff options
author | Chris Lattner <sabre@nondot.org> | 2006-03-11 20:20:40 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-03-11 20:20:40 +0000 |
commit | 74cfb7d7b3d24671d80bd866e0131e830d1bd9b1 (patch) | |
tree | 6f0157580011f426407ad90f6ae84e8112bcd23c | |
parent | c20995e070ff96da2d4698b67827a99f4a3bbb43 (diff) |
add an example
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26709 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/README.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Target/README.txt b/lib/Target/README.txt index f77fbc2eea..220bd9e520 100644 --- a/lib/Target/README.txt +++ b/lib/Target/README.txt @@ -121,6 +121,17 @@ Reassociate should turn: X*X*X*X -> t=(X*X) (t*t) to eliminate a multiply. //===---------------------------------------------------------------------===// +Interesting? testcase for add/shift/mul reassoc: + +int bar(int x, int y) { + return x*x*x+y+x*x*x*x*x*y*y*y*y; +} +int foo(int z, int n) { + return bar(z, n) + bar(2*z, 2*n); +} + +//===---------------------------------------------------------------------===// + These two functions should generate the same code on big-endian systems: int g(int *j,int *l) { return memcmp(j,l,4); } |