diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-04-20 23:18:40 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-04-20 23:18:40 +0000 |
| commit | 84776786a7aa77187234ae2183494c20a3cbc9c7 (patch) | |
| tree | 650df22d714146df65911646c0289b64c0cf1d28 /clang/lib/Sema/CodeCompleteConsumer.cpp | |
| parent | 6d159c1060f953aff48066111d48c7ce8e43b54b (diff) | |
| download | bcm5719-llvm-84776786a7aa77187234ae2183494c20a3cbc9c7.tar.gz bcm5719-llvm-84776786a7aa77187234ae2183494c20a3cbc9c7.zip | |
teach the x86 address matching stuff to handle
(shl (or x,c), 3) the same as (shl (add x, c), 3)
when x doesn't have any bits from c set.
This finishes off PR1135. Before we compiled the block to:
to:
LBB0_3: ## %bb
cmpb $4, %dl
sete %dl
addb %dl, %cl
movb %cl, %dl
shlb $2, %dl
addb %r8b, %dl
shlb $2, %dl
movzbl %dl, %edx
movl %esi, (%rdi,%rdx,4)
leaq 2(%rdx), %r9
movl %esi, (%rdi,%r9,4)
leaq 1(%rdx), %r9
movl %esi, (%rdi,%r9,4)
addq $3, %rdx
movl %esi, (%rdi,%rdx,4)
incb %r8b
decb %al
movb %r8b, %dl
jne LBB0_1
Now we produce:
LBB0_3: ## %bb
cmpb $4, %dl
sete %dl
addb %dl, %cl
movb %cl, %dl
shlb $2, %dl
addb %r8b, %dl
shlb $2, %dl
movzbl %dl, %edx
movl %esi, (%rdi,%rdx,4)
movl %esi, 8(%rdi,%rdx,4)
movl %esi, 4(%rdi,%rdx,4)
movl %esi, 12(%rdi,%rdx,4)
incb %r8b
decb %al
movb %r8b, %dl
jne LBB0_1
llvm-svn: 101958
Diffstat (limited to 'clang/lib/Sema/CodeCompleteConsumer.cpp')
0 files changed, 0 insertions, 0 deletions

