This is an archive of the discontinued LLVM Phabricator instance.

[Sink] Really really fix predicate in legality check
ClosedPublic

Authored by escha on Jan 11 2018, 12:58 PM.

Details

Reviewers
loladiro
majnemer
Summary

LoadInst isn't enough; we need to include intrinsics that perform loads too.

All side-effecting intrinsics and such are already covered by the isSafe check, so we just need to care about things that read from memory.

Diff Detail

Repository
rL LLVM

Event Timeline

escha created this revision.Jan 11 2018, 12:58 PM
loladiro accepted this revision.Jan 11 2018, 1:04 PM

Looks good to me with the minor tweak to the test. To keep the breadcrumb for future reference, I had changed this in D33179.

test/Transforms/Sink/badloadsink.ll
21

i32 %off or just get rid of the arguments entirely

This revision is now accepted and ready to land.Jan 11 2018, 1:04 PM
loladiro closed this revision.May 17 2018, 9:48 PM

This was merged in rL322311, closing to get it off my dashboard. In the future, ideally add

Differential Revision: https://reviews.llvm.org/D41960

with that syntax to the commit message, so Phabricator can close the revision automatically.