From 74cfb7d7b3d24671d80bd866e0131e830d1bd9b1 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 11 Mar 2006 20:20:40 +0000 Subject: [PATCH] add an example git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26709 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/README.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/Target/README.txt b/lib/Target/README.txt index f77fbc2eea7..220bd9e5208 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); } -- 2.34.1