This is an archive of the discontinued LLVM Phabricator instance.

[X86][SSE] Add zero element and general 64-bit VZEXT_LOAD support to EltsFromConsecutiveLoads
ClosedPublic

Authored by RKSimon on Jan 15 2016, 5:44 AM.

Details

Summary

This patch adds support for trailing zero elements to VZEXT_LOAD loads (and checks that no zero elts occur within the consecutive load).

It also generalizes the 64-bit VZEXT_LOAD load matching to work for loads other than 2x32-bit loads.

After this patch it will also be easier to add support for other basic load patterns like 32-bit VZEXT_LOAD loads, PMOVZX and subvector load insertion.

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon updated this revision to Diff 44977.Jan 15 2016, 5:44 AM
RKSimon retitled this revision from to [X86][SSE] Add zero element and general 64-bit VZEXT_LOAD support to EltsFromConsecutiveLoads.
RKSimon updated this object.
RKSimon added reviewers: spatel, mkuper.
RKSimon set the repository for this revision to rL LLVM.
RKSimon added a subscriber: llvm-commits.
spatel accepted this revision.Jan 25 2016, 10:40 AM
spatel edited edge metadata.

LGTM, but see inline comments for some nits.

lib/Target/X86/X86ISelLowering.cpp
5438 ↗(On Diff #44977)

I don't see any use of the subtarget param. Remove here and and no need to change the callers?

5481 ↗(On Diff #44977)

Please mark this comment as a 'TODO' or 'FIXME' for easier grepping.

5497–5498 ↗(On Diff #44977)

I think the preferred method is to use 'VT.getStoreSize()' in these situations.

5543–5544 ↗(On Diff #44977)

Similar to above comment: I think 'getStoreSizeInBits()' is the preferred usage.

This revision is now accepted and ready to land.Jan 25 2016, 10:40 AM
This revision was automatically updated to reflect the committed changes.