From c720279ac7d7712b1d8db3a982fdd0ac3852af6e Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 2 Oct 2007 19:55:05 +0000 Subject: [PATCH] Micro-optimization -- missed LICM opportunity. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42542 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/README-SSE.txt | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/lib/Target/X86/README-SSE.txt b/lib/Target/X86/README-SSE.txt index 9d642910b73..20e5a91dc51 100644 --- a/lib/Target/X86/README-SSE.txt +++ b/lib/Target/X86/README-SSE.txt @@ -671,3 +671,27 @@ beneficial because it prevents the load from being folded into the multiply. //===---------------------------------------------------------------------===// +In this loop: + +LBB4_6: # bb47.preheader + shlw $2, %si + decw %si + movzwl %si, %eax + incl %eax + xorl %ecx, %ecx +LBB4_7: # bb47 + xorps %xmm0, %xmm0 # (1) + movaps %xmm0, (%edx) + movaps %xmm0, 16(%edx) + addl $32, %edx + incl %ecx + cmpl %eax, %ecx + jne LBB4_7 # bb47 +LBB4_8: # bb42.return_crit_edge + xorw %si, %si + jmp LBB4_12 # return + +The instruction at (1) can be moved out of the main body of the loop. + +//===---------------------------------------------------------------------===// +