This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Don't sink dynamic allocas
ClosedPublic

Authored by rnk on Jan 17 2019, 11:44 AM.

Details

Summary

InstCombine's sinking algorithm only thinks about memory. It doesn't
think about non-memory constraints like stack object lifetime. It can
sink dynamic allocas across a stacksave call, which may be used with
stackrestore, which can incorrectly reduce the lifetime of the dynamic
alloca.

Fixes PR40365

Diff Detail

Repository
rL LLVM

Event Timeline

rnk created this revision.Jan 17 2019, 11:44 AM
This revision is now accepted and ready to land.Jan 17 2019, 12:03 PM
This revision was automatically updated to reflect the committed changes.