summaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/README.txt
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-11-07 18:30:21 +0000
committerChris Lattner <sabre@nondot.org>2006-11-07 18:30:21 +0000
commit6e11295b2354fb8828b15964038a1d60fb3df88a (patch)
tree074c532973ec3fcdc6c4b263e53da439c9447e3a /lib/Target/PowerPC/README.txt
parent393ebae0ef7fa72d133bf901a02fcce3b5554ab7 (diff)
downloadllvm-6e11295b2354fb8828b15964038a1d60fb3df88a.tar.gz
llvm-6e11295b2354fb8828b15964038a1d60fb3df88a.tar.bz2
llvm-6e11295b2354fb8828b15964038a1d60fb3df88a.tar.xz
add a note from viterbi
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31506 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/README.txt')
-rw-r--r--lib/Target/PowerPC/README.txt29
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/README.txt b/lib/Target/PowerPC/README.txt
index 70e97f74cd..8834699f63 100644
--- a/lib/Target/PowerPC/README.txt
+++ b/lib/Target/PowerPC/README.txt
@@ -11,6 +11,35 @@ still a codesize win.
===-------------------------------------------------------------------------===
+We compile the hottest inner loop of viterbi to:
+
+ li r6, 0
+ b LBB1_84 ;bb432.i
+LBB1_83: ;bb420.i
+ lbzx r8, r5, r7
+ addi r6, r7, 1
+ stbx r8, r4, r7
+LBB1_84: ;bb432.i
+ mr r7, r6
+ cmplwi cr0, r7, 143
+ bne cr0, LBB1_83 ;bb420.i
+
+The CBE manages to produce:
+
+ li r0, 143
+ mtctr r0
+loop:
+ lbzx r2, r2, r11
+ stbx r0, r2, r9
+ addi r2, r2, 1
+ bdz later
+ b loop
+
+This could be much better (bdnz instead of bdz) but it still beats us. If we
+produced this with bdnz, the loop would be a single dispatch group.
+
+===-------------------------------------------------------------------------===
+
Compile:
void foo(int *P) {