diff options
author | Chris Lattner <sabre@nondot.org> | 2006-11-10 01:33:53 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-11-10 01:33:53 +0000 |
commit | 26ddb506ec08789d33298efb3a5c142dea22e320 (patch) | |
tree | 215082cdfdc7e9616facbb5e25a743adce2ba8b1 | |
parent | 171d09ea537ac272091a1a2560302074b144fcca (diff) |
add note about ugly codegen with preinc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31617 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/PowerPC/README.txt | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/README.txt b/lib/Target/PowerPC/README.txt index 8834699f63a..0b4f78f67b0 100644 --- a/lib/Target/PowerPC/README.txt +++ b/lib/Target/PowerPC/README.txt @@ -9,6 +9,35 @@ TODO: Support 'update' load/store instructions. These are cracked on the G5, but are still a codesize win. +With preinc enabled, this: + +long *%test4(long *%X, long *%dest) { + %Y = getelementptr long* %X, int 4 + %A = load long* %Y + store long %A, long* %dest + ret long* %Y +} + +compiles to: + +_test4: + mr r2, r3 + lwzu r5, 32(r2) + lwz r3, 36(r3) + stw r5, 0(r4) + stw r3, 4(r4) + mr r3, r2 + blr + +with -sched=list-burr, I get: + +_test4: + lwz r2, 36(r3) + lwzu r5, 32(r3) + stw r2, 4(r4) + stw r5, 0(r4) + blr + ===-------------------------------------------------------------------------=== We compile the hottest inner loop of viterbi to: |