[PATCH] D153511: [BasicAA] Don't short-circuit non-capturing arguments
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 22 11:41:01 PDT 2023
nikic added a comment.
You don't really need an assume to show the issue, this simpler variant exhibits the same problem: https://llvm.godbolt.org/z/M3K5fG97G The store is removed even though the call reads it.
This just happens to mostly work out fine right now because such calls get DCEd, so we don't observe end-to-end miscompiles. If capture tracking were slightly smarter and followed the return value (as we effectively do in the assume case) we would get observable miscompiles even without ephemeral value interactions.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153511/new/
https://reviews.llvm.org/D153511
More information about the llvm-commits
mailing list