summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-03-11 20:20:40 +0000
committerChris Lattner <sabre@nondot.org>2006-03-11 20:20:40 +0000
commit4e56b686f11d71dda1a04a10c71bb900c8497619 (patch)
treeb93017aa6153de7412c38eb1c45300b7e48ca435 /llvm/lib/Target
parent003f633036a4f5864694850cdbf79238dd79dd1c (diff)
downloadbcm5719-llvm-4e56b686f11d71dda1a04a10c71bb900c8497619.tar.gz
bcm5719-llvm-4e56b686f11d71dda1a04a10c71bb900c8497619.zip
add an example
llvm-svn: 26709
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/README.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/Target/README.txt b/llvm/lib/Target/README.txt
index f77fbc2eea7..220bd9e5208 100644
--- a/llvm/lib/Target/README.txt
+++ b/llvm/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); }
OpenPOWER on IntegriCloud