This is an archive of the discontinued LLVM Phabricator instance.

merge vector stores into wider vector stores (PR21711)
ClosedPublic

Authored by spatel on Jan 27 2015, 12:07 PM.

Details

Summary

This is, hopefully, the final patch needed to resolve 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)

To minimize changes, this patch is limited to handling the single pattern of extract_subvectors feeding into stores, but I've included test cases for the other store merge patterns that could be handled similarly: build_vectors of constants and vector loads feeding into vector stores that could be widened.

Diff Detail

Repository
rL LLVM

Event Timeline

spatel updated this revision to Diff 18835.Jan 27 2015, 12:07 PM
spatel retitled this revision from to merge vector stores into wider vector stores (PR21711).
spatel updated this object.
spatel edited the test plan for this revision. (Show Details)
spatel added reviewers: qcolombet, hfinkel, andreadb.
spatel added a subscriber: Unknown Object (MLST).
hfinkel accepted this revision.Jan 27 2015, 12:40 PM
hfinkel edited edge metadata.

LGTM.

lib/CodeGen/SelectionDAG/DAGCombiner.cpp
9860 ↗(On Diff #18835)

Indenting looks odd here.

This revision is now accepted and ready to land.Jan 27 2015, 12:40 PM
This revision was automatically updated to reflect the committed changes.
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
9860 ↗(On Diff #18835)

Thanks, Hal! Fixed indent and checked in at r227242.