mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
add a note
llvm-svn: 123752
This commit is contained in:
parent
fa467f3d1b
commit
08e1bf567f
@ -2295,3 +2295,23 @@ avoids partial register stalls in some important cases.
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
We miss an optzn when lowering divide by some constants. For example:
|
||||
int test(int x) { return x/10; }
|
||||
|
||||
We produce:
|
||||
|
||||
_test: ## @test
|
||||
## BB#0: ## %entry
|
||||
movslq %edi, %rax
|
||||
imulq $1717986919, %rax, %rax ## imm = 0x66666667
|
||||
movq %rax, %rcx
|
||||
shrq $63, %rcx
|
||||
** shrq $32, %rax
|
||||
** sarl $2, %eax
|
||||
addl %ecx, %eax
|
||||
ret
|
||||
|
||||
The two starred instructions could be replaced with a "sarl $34, %rax". This
|
||||
occurs in 186.crafty very frequently.
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
Loading…
Reference in New Issue
Block a user