diff options
author | Chris Lattner <sabre@nondot.org> | 2009-11-29 01:15:43 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-11-29 01:15:43 +0000 |
commit | 78c6d4fa9c95e5f841a7f081dcea238054453874 (patch) | |
tree | 115703f83d59f8ada2a2d31a14dcd92fee2692e2 /utils/FileCheck/FileCheck.cpp | |
parent | 9fed3c2835b61123528d5abe1f8ebc47aa6a81e4 (diff) |
Add a testcase for:
void test(int N, double* G) {
long j;
for (j = 1; j < N - 1; j++)
G[j] = G[j] + G[j+1] + G[j-1];
}
which we now compile to one load in the loop:
LBB1_2: ## %bb
movsd 16(%rsi,%rax,8), %xmm2
incq %rdx
addsd %xmm2, %xmm1
addsd %xmm1, %xmm0
movapd %xmm2, %xmm1
movsd %xmm0, 8(%rsi,%rax,8)
incq %rax
cmpq %rcx, %rax
jne LBB1_2
instead of:
LBB1_2: ## %bb
movsd 8(%rsi,%rax,8), %xmm0
addsd 16(%rsi,%rax,8), %xmm0
addsd (%rsi,%rax,8), %xmm0
movsd %xmm0, 8(%rsi,%rax,8)
incq %rax
cmpq %rcx, %rax
jne LBB1_2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90048 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/FileCheck/FileCheck.cpp')
0 files changed, 0 insertions, 0 deletions