This is an archive of the discontinued LLVM Phabricator instance.

[X86]Fix a crash trying to convert indices to proper type.
ClosedPublic

Authored by ABataev on May 4 2021, 7:52 AM.

Details

Summary

Need to perform a bitcast on IndicesVec rather than subvector extract if the original size of the IndicesVec is the same as the size of the destination type.

Diff Detail

Event Timeline

ABataev created this revision.May 4 2021, 7:52 AM
ABataev requested review of this revision.May 4 2021, 7:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 4 2021, 7:52 AM
RKSimon edited the summary of this revision. (Show Details)May 4 2021, 8:56 AM
RKSimon edited the summary of this revision. (Show Details)
RKSimon added inline comments.May 4 2021, 11:04 AM
llvm/test/CodeGen/X86/vector-extract-bitcast.ll
2 ↗(On Diff #342739)

It'd be better to add this test inside var-permute-128.ll I think.

4 ↗(On Diff #342739)

Please can you drop the local_unnamed_addr and give function a better name

ABataev updated this revision to Diff 342806.May 4 2021, 11:11 AM

Address comments

RKSimon accepted this revision.May 4 2021, 2:35 PM

LGTM

This revision is now accepted and ready to land.May 4 2021, 2:35 PM
This revision was landed with ongoing or failed builds.May 5 2021, 5:15 AM
This revision was automatically updated to reflect the committed changes.