Page MenuHomePhabricator

[CostModel] Fixed isExtractSubvectorMask for undef index off end
ClosedPublic

Authored by tpr on Fri, Nov 8, 5:48 AM.

Details

Summary

ShuffleVectorInst::isExtractSubvectorMask, introduced in

[CostModel] Add SK_ExtractSubvector handling to getInstructionThroughput (PR39368)

erroneously thought that
%340 = shufflevector <4 x float> %339, <4 x float> undef, <3 x i32> <i32 2, i32 3, i32 undef>

is a subvector extract, even though it goes off the end of the parent
vector with the undef index. That then caused an assert in
BasicTTIImplBase::getExtractSubvectorOverhead.

This commit fixes that, by not considering the above a subvector
extract.

Change-Id: I87b8b00b24bef19ffc9a1b82ef4eca3b8a246eaf

Diff Detail

Event Timeline

tpr created this revision.Fri, Nov 8, 5:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptFri, Nov 8, 5:48 AM
tpr added a reviewer: RKSimon.Fri, Nov 8, 5:51 AM
tpr added subscribers: dstuttard, foad.
tpr added a subscriber: rampitec.
RKSimon accepted this revision.Fri, Nov 8, 6:14 AM

LGTM - cheers

This revision is now accepted and ready to land.Fri, Nov 8, 6:14 AM
This revision was automatically updated to reflect the committed changes.