mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-04 21:30:49 +00:00
add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26513 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8df346b4e8
commit
b27b69f283
@ -86,3 +86,18 @@ int f(int a, int b){ return a * a + 2 * a * b + b * b; }
|
||||
into:
|
||||
int f(int a, int b) { return a * (a + 2 * b) + b * b; }
|
||||
to eliminate a multiply.
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
On targets with expensive 64-bit multiply, we could LSR this:
|
||||
|
||||
for (i = ...; ++i) {
|
||||
x = 1ULL << i;
|
||||
|
||||
into:
|
||||
long long tmp = 1;
|
||||
for (i = ...; ++i, tmp+=tmp)
|
||||
x = tmp;
|
||||
|
||||
This would be a win on ppc32, but not x86 or ppc64.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user