D129370 started hoisting allocas across stacksave/stackrestore
boundaries which is wrong.
Details
Details
- Reviewers
chill rnk efriedma - Commits
- rG5a33d1f0b943: [SimplifyCFG] Don't hoist allocas
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Thanks! LGTM.
There's a comment about mayHaveSideEffects that's not entirely correct, maybe it can be reworded somewhat?
https://github.com/llvm/llvm-project/blob/1f7b94e0ec7fae446e2ef9fcc41968fc711fb2c7/llvm/include/llvm/IR/Instruction.h#L630
Comment Actions
The comment suggests isSafeToSpeculativelyExecute. Perhaps that is more appropriate for this transform, which hoists? Either way, correctness first, let's land the fix and you can iterate on improvements and simplifications.