This is an archive of the discontinued LLVM Phabricator instance.

Do not strip metadata from load of constant memory
AbandonedPublic

Authored by yuyichao on Aug 8 2020, 11:42 PM.

Details

Reviewers
sanjoy
Summary

These load should always return the same result. It'll also be nice if there's a way to create a instruction specific list of metadata that is always safe to speculate but this should be good and simple enough for now...

Ref https://github.com/JuliaLang/julia/pull/36970

Diff Detail

Event Timeline

yuyichao created this revision.Aug 8 2020, 11:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 8 2020, 11:42 PM
yuyichao requested review of this revision.Aug 8 2020, 11:42 PM
yuyichao abandoned this revision.Aug 31 2020, 7:50 PM

Actually I don't think this is correct so I'm closing this. It should actually be valid to only mark a load as constant even if it is only true behind a branch and in such case moving the load out of the branch should indeed have the metadata stripped out.