diff options
author | Chris Lattner <sabre@nondot.org> | 2007-12-28 21:50:40 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-12-28 21:50:40 +0000 |
commit | d7980024012a87f7ffbb6eaa734e013a7e4db61a (patch) | |
tree | b2dd52ad83cce5260742ee9e00d9881784fb275a /llvm | |
parent | 3de3f9981e9fec3c4721c47c5a3e9ab9268181c3 (diff) | |
download | bcm5719-llvm-d7980024012a87f7ffbb6eaa734e013a7e4db61a.tar.gz bcm5719-llvm-d7980024012a87f7ffbb6eaa734e013a7e4db61a.zip |
add a note.
llvm-svn: 45387
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/lib/Target/X86/README.txt | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/README.txt b/llvm/lib/Target/X86/README.txt index ad15b14f166..3bb92d1cad5 100644 --- a/llvm/lib/Target/X86/README.txt +++ b/llvm/lib/Target/X86/README.txt @@ -1585,3 +1585,35 @@ movl $0, 124(%esp) if the flags of the xor are dead. //===---------------------------------------------------------------------===// + +This testcase misses a read/modify/write opportunity (from PR1425): + +void vertical_decompose97iH1(int *b0, int *b1, int *b2, int width){ + int i; + for(i=0; i<width; i++) + b1[i] += (1*(b0[i] + b2[i])+0)>>0; +} + +We compile it down to: + +LBB1_2: # bb + movl (%esi,%edi,4), %ebx + addl (%ecx,%edi,4), %ebx + addl (%edx,%edi,4), %ebx + movl %ebx, (%ecx,%edi,4) + incl %edi + cmpl %eax, %edi + jne LBB1_2 # bb + +the inner loop should add to the memory location (%ecx,%edi,4), saving +a mov. Something like: + + movl (%esi,%edi,4), %ebx + addl (%edx,%edi,4), %ebx + addl %ebx, (%ecx,%edi,4) + +Additionally, LSR should rewrite the exit condition of the loop to use +a stride-4 IV, would would allow all the scales in the loop to go away. +This would result in smaller code and more efficient microops. + +//===---------------------------------------------------------------------===// |