add an example
authorChris Lattner <sabre@nondot.org>
Sat, 11 Mar 2006 20:20:40 +0000 (20:20 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 11 Mar 2006 20:20:40 +0000 (20:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26709 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/README.txt

index f77fbc2eea71e7f72afccda920a4e36c522a3645..220bd9e5208cbb77bf6386af8aebab3592e26e33 100644 (file)
@@ -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);  }