This is an archive of the discontinued LLVM Phabricator instance.

[IR] Don't assume readnone/readonly intrinsics are willreturn
ClosedPublic

Authored by nikic on Nov 8 2022, 3:51 AM.

Details

Summary

This removes our "temporary" hack to assume that readnone/readonly intrinsics are also willreturn. An explicit willreturn annotation, usually via default intrinsic attributes, is now required.

Depends on D137557, D137623, D137629.

Diff Detail

Event Timeline

nikic created this revision.Nov 8 2022, 3:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 8 2022, 3:51 AM
nikic requested review of this revision.Nov 8 2022, 3:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 8 2022, 3:51 AM
nikic added inline comments.Nov 8 2022, 3:53 AM
llvm/lib/Transforms/Utils/Local.cpp
459

These are intrinsics for which the current readnone -> willreturn assumption is incorrect, but optimizations currently rely on it. Needs to be addressed in a followup.

jdoerfert accepted this revision.Nov 11 2022, 5:01 PM

LG, removes the hack for all but 4 intrinsics. Thanks for getting rid of it.

This revision is now accepted and ready to land.Nov 11 2022, 5:01 PM