This is an archive of the discontinued LLVM Phabricator instance.

[SLPVectorizer] Merge reorderAltShuffleOperands into reorderInputsAccordingToOpcode
ClosedPublic

Authored by RKSimon on Mar 25 2019, 10:57 AM.

Details

Summary

As discussed on D59738, this generalizes reorderInputsAccordingToOpcode to handle multiple + non-commutative instructions so we can get rid of reorderAltShuffleOperands and make use of the extra canonicalizations that reorderInputsAccordingToOpcode brings.

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon created this revision.Mar 25 2019, 10:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 25 2019, 10:57 AM
ABataev added inline comments.Mar 25 2019, 11:31 AM
lib/Transforms/Vectorize/SLPVectorizer.cpp
2918–2927

auto * VL

2922

Either use continue; here or else in else if. Only if is going to be enough.

2934–2943

auto *VL

2939

Again, you may remove else here

RKSimon updated this revision to Diff 192177.Mar 25 2019, 11:58 AM

Fixed style issues noticed by @ABataev and added assertion message.

This revision is now accepted and ready to land.Mar 25 2019, 12:04 PM
This revision was automatically updated to reflect the committed changes.