This is an archive of the discontinued LLVM Phabricator instance.

[SLPVectorizer] Make aliasing check more precise
ClosedPublic

Authored by nikic on Aug 31 2021, 11:38 AM.

Details

Summary

SLPVectorizer currently uses AA::isNoAlias() to determine whether two locations alias. This does not work if one of the instructions is a call. Instead, we should check getModRefInfo(), which determines whether an arbitrary modified or references a given location.

Among other things, this prevents @llvm.experimental.noalias.scope.decl() and other inaccessiblmemonly intrinsics from interfering with SLP vectorization.

Diff Detail

Event Timeline

nikic created this revision.Aug 31 2021, 11:38 AM
nikic requested review of this revision.Aug 31 2021, 11:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 31 2021, 11:38 AM
This revision is now accepted and ready to land.Aug 31 2021, 1:23 PM
This revision was landed with ongoing or failed builds.Aug 31 2021, 1:35 PM
This revision was automatically updated to reflect the committed changes.