[PATCH] D136285: Bad optimization with alloca and intrinsic function stackrestore
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 27 12:26:57 PDT 2022
rnk added inline comments.
================
Comment at: llvm/test/Transforms/MemCpyOpt/stackrestore.ll:97
+ %SS = tail call ptr @llvm.stacksave()
+ %A2 = alloca [56 x i8], align 4
+ store i8 1, ptr %A2, align 4
----------------
My expectation is that all the allocas here are static: They are part of the entry block, they will be part of the initial stack allocation, they will not be affected by stacksave/restore. This does mean that simplifycfg can extend the lifetime of a stack allocation, but to my knowledge, that's valid, the program should have the same observable behavior.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136285/new/
https://reviews.llvm.org/D136285
More information about the llvm-commits
mailing list