This is an archive of the discontinued LLVM Phabricator instance.

[IR] Support scalable vectors in ShuffleVectorInst::increasesLength
ClosedPublic

Authored by c-rhodes on Dec 2 2020, 2:39 AM.

Details

Summary

Since the length of the llvm::SmallVector shufflemask is related to the
minimum number of elements in a scalable vector, it is fine to just get
the Min field of the ElementCount. This is already done for the similar
function changesLength, tests have been added for both.

Diff Detail

Event Timeline

c-rhodes created this revision.Dec 2 2020, 2:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 2 2020, 2:39 AM
Herald added a subscriber: dexonsmith. · View Herald Transcript
sdesmalen accepted this revision.Dec 3 2020, 3:11 AM

LGTM

llvm/unittests/IR/InstructionsTest.cpp
1095

Nothing to change in this patch, but I just thought this interface had been removed so that it would take an ArrayRef instead of a Constant?

This revision is now accepted and ready to land.Dec 3 2020, 3:11 AM
c-rhodes added inline comments.Dec 3 2020, 3:26 AM
llvm/unittests/IR/InstructionsTest.cpp
1095

Nothing to change in this patch, but I just thought this interface had been removed so that it would take an ArrayRef instead of a Constant?

There's two interfaces where Mask can be either an llvm::Value or ArrayRef<int>, I think most of these tests are using the former interface since they pass an llvm::Constant

This revision was landed with ongoing or failed builds.Dec 7 2020, 2:43 AM
This revision was automatically updated to reflect the committed changes.