[PATCH] D24693: [CodeGen] Don't emit lifetime intrinsics for some local variables

Akira Hatanaka via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 21 15:35:00 PDT 2016

ahatanak added a comment.

In https://reviews.llvm.org/D24693#549095, @majnemer wrote:

> This doesn't sound right.  Given the example in the description, we are accessing the memory location after end has been called: this seems like a real miscompile.  It would appear unsafe to only do this for asan.

My impression was that this wasn't a miscompile, but I'm not so sure now. Do you have a concrete example where any of the optimization passes miscompile the code like that shown in PR28267 because of missing or misplaced lifetime intrinsics? I spent some time looking at how StackColoring (which is the primary user of this intrinsic) transforms the code in PR28267, and it didn't look like this would cause any miscompile (it seemed like it was able to compute the lifetime interval for %tmp correctly). I'm not sure whether other optimization passes are handling it correctly though.


More information about the cfe-commits mailing list