[llvm-commits] [llvm] r137308 - in /llvm/trunk: lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/avx-insert.ll
Bruno Cardoso Lopes
bruno.cardoso at gmail.com
Thu Aug 11 09:59:41 PDT 2011
Hi Nadav,
On Thu, Aug 11, 2011 at 9:41 AM, Nadav Rotem <nadav.rotem at intel.com> wrote:
> Author: nadav
> Date: Thu Aug 11 11:41:21 2011
> New Revision: 137308
>
> URL: http://llvm.org/viewvc/llvm-project?rev=137308&view=rev
> Log:
> [AVX] If the data which is going to be saved is already in two XMM registers
> (for example, after integer operation), do not pack the registers into a YMM
> before saving. Its better to save as two XMM registers.
>
> Before:
> vinsertf128 $1, %xmm3, %ymm0, %ymm3
> vinsertf128 $0, %xmm1, %ymm3, %ymm1
> vmovaps %ymm1, 416(%rsp)
>
> After:
> vmovaps %xmm3, 416+16(%rsp)
> vmovaps %xmm1, 416(%rsp)
This is better in Sandy Bridge cause one 256-bit mem op is done via
two 128-bit ones. If in the future the cost becomes only one memory
access the first version would be better. Could you please add a note
in a comment so we can care about that later?
--
Bruno Cardoso Lopes
http://www.brunocardoso.cc
More information about the llvm-commits
mailing list