Merge vector stores into wider vector stores (PR21711)
authorSanjay Patel <spatel@rotateright.com>
Tue, 27 Jan 2015 20:50:27 +0000 (20:50 +0000)
committerSanjay Patel <spatel@rotateright.com>
Tue, 27 Jan 2015 20:50:27 +0000 (20:50 +0000)
commitc94f9d3d2f2ad4b8aa1370730f7f0b9c7ad40439
tree61eb556fef9b2377293d3e44e2517125e799eb4d
parentc1592bca1e85596abc3dc0a67e2815fa0f84748d
Merge vector stores into wider vector stores (PR21711)

This patch resolves part of PR21711 ( http://llvm.org/bugs/show_bug.cgi?id=21711 ).

The 'f3' test case in that report presents a situation where we have two 128-bit
stores extracted from a 256-bit source vector.

Instead of producing this:

vmovaps %xmm0, (%rdi)
vextractf128    $1, %ymm0, 16(%rdi)

This patch merges the 128-bit stores into a single 256-bit store:

vmovups %ymm0, (%rdi)

Differential Revision: http://reviews.llvm.org/D7208

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227242 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/X86/MergeConsecutiveStores.ll