This is an archive of the discontinued LLVM Phabricator instance.

[X86][AVX] Use extract_subvector to reduce vector op widths (PR36761)
ClosedPublic

Authored by RKSimon on Jul 19 2018, 10:08 AM.

Details

Summary

We have a number of cases where we fail to reduce vector op widths, performing the op in a larger vector and then extracting a subvector. This is often because by default it would create illegal types.

This peephole patch attempts to handle a few common cases detailed in PR36761, which typically involved extension+conversion to vX2f64 types.

The current code isn't very generic - I'm not sure how many more cases we may need to support in the future?

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon created this revision.Jul 19 2018, 10:08 AM
craig.topper accepted this revision.Jul 19 2018, 10:29 AM

LGTM other than that comment.

lib/Target/X86/X86ISelLowering.cpp
39302 ↗(On Diff #156303)

getValueType() -> getSimpleValueType()

This revision is now accepted and ready to land.Jul 19 2018, 10:29 AM
This revision was automatically updated to reflect the committed changes.