Page MenuHomePhabricator

[CostModel] Fixed isExtractSubvectorMask for undef index off end

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



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

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

Change-Id: I87b8b00b24bef19ffc9a1b82ef4eca3b8a246eaf

Diff Detail

Event Timeline

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

LGTM - cheers

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