mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 19:29:31 +00:00
Another high-prio selection performance bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25828 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6656dd1a78
commit
8e38ae60c7
@ -314,3 +314,49 @@ _cmp:
|
||||
|
||||
Think about doing i64 math in SSE regs.
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
The DAG Isel doesn't fold the loads into the adds in this testcase. The
|
||||
pattern selector does. This is because the chain value of the load gets
|
||||
selected first, and the loads aren't checking to see if they are only used by
|
||||
and add.
|
||||
|
||||
.ll:
|
||||
|
||||
int %test(int* %x, int* %y, int* %z) {
|
||||
%X = load int* %x
|
||||
%Y = load int* %y
|
||||
%Z = load int* %z
|
||||
%a = add int %X, %Y
|
||||
%b = add int %a, %Z
|
||||
ret int %b
|
||||
}
|
||||
|
||||
dag isel:
|
||||
|
||||
_test:
|
||||
movl 4(%esp), %eax
|
||||
movl (%eax), %eax
|
||||
movl 8(%esp), %ecx
|
||||
movl (%ecx), %ecx
|
||||
addl %ecx, %eax
|
||||
movl 12(%esp), %ecx
|
||||
movl (%ecx), %ecx
|
||||
addl %ecx, %eax
|
||||
ret
|
||||
|
||||
pattern isel:
|
||||
|
||||
_test:
|
||||
movl 12(%esp), %ecx
|
||||
movl 4(%esp), %edx
|
||||
movl 8(%esp), %eax
|
||||
movl (%eax), %eax
|
||||
addl (%edx), %eax
|
||||
addl (%ecx), %eax
|
||||
ret
|
||||
|
||||
This is bad for register pressure, though the dag isel is producing a
|
||||
better schedule. :)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user