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 | 73d45454beb39d77c53ab7270c8f6c0d976e4cd4 (patch) | |
tree | 9eff220dfb740cbfba52666fd1eba5e3f7656db2 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | a73adac52e08f88e350b6e5c2687c559bf68bffa (diff) | |
download | llvm-73d45454beb39d77c53ab7270c8f6c0d976e4cd4.zip llvm-73d45454beb39d77c53ab7270c8f6c0d976e4cd4.tar.gz llvm-73d45454beb39d77c53ab7270c8f6c0d976e4cd4.tar.bz2 |
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
llvm-svn: 90048
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions