This is an archive of the discontinued LLVM Phabricator instance.

[X86] Add isSimple check to the load combine in combineExtractVectorElt.
ClosedPublic

Authored by craig.topper on May 25 2022, 12:24 AM.

Details

Summary

I think we need to be sure the load isn't volatile before we
duplicate and shrink it.

Noticed while looking at this code for other reasons. So I don't have
a test case. If we agree this is a bug I can try to add one.

Diff Detail

Event Timeline

craig.topper created this revision.May 25 2022, 12:24 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 25 2022, 12:24 AM
craig.topper requested review of this revision.May 25 2022, 12:24 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 25 2022, 12:24 AM

Rebase. I used the wrong repo so it might have been older than I meant it to be.

spatel accepted this revision.May 25 2022, 5:25 AM

Test added with:
d5ebba2aa683

Please rebase and LGTM - this is conservatively correct, and the fact that there were no tests indicates that the missing check was an oversight.

This revision is now accepted and ready to land.May 25 2022, 5:25 AM
This revision was landed with ongoing or failed builds.May 25 2022, 9:11 AM
This revision was automatically updated to reflect the committed changes.