This is an archive of the discontinued LLVM Phabricator instance.

[SLP] Add support for swapping icmp/fcmp predicates to permit vectorization
ClosedPublic

Authored by RKSimon on Mar 28 2019, 12:17 PM.

Details

Summary

We should be able to match elements with the swapped predicate as well - as long as we commute the source operands.

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon created this revision.Mar 28 2019, 12:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 28 2019, 12:17 PM
ABataev added inline comments.Mar 28 2019, 1:02 PM
lib/Transforms/Vectorize/SLPVectorizer.cpp
1860

CmpInst *->auto *. You need always to add & or * to the auto (if any can be applied) to make it easier to read the code.

1861

Better to use Value * here because it is not easy to deduce the type from the operation.

1862

Same here

RKSimon updated this revision to Diff 192714.Mar 28 2019, 2:08 PM

Addressed @ABataev 's comments

This revision is now accepted and ready to land.Mar 28 2019, 2:17 PM
This revision was automatically updated to reflect the committed changes.