HomePhabricator

[SROA] Fix crash with lifetime intrinsic partially covering alloca.

Authored by eli.friedman on Aug 7 2016, 6:30 PM.

Description

[SROA] Fix crash with lifetime intrinsic partially covering alloca.

Summary:
PromoteMemToReg looks specifically for the pattern
bitcast+lifetime.start (or a bitcast-equivalent GEP); any offset
will lead to an assertion failure.

Fixes https://llvm.org/bugs/show_bug.cgi?id=27999 .

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

llvm-svn: 277969