mirror of
https://github.com/RPCSX/llvm.git
synced 2025-03-03 02:17:41 +00:00
add an example
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26709 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c20995e070
commit
74cfb7d7b3
@ -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); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user