[PATCH] D105374: [SimplifyCFG] simplifyUnreachable(): erase instructions iff they are guaranteed to transfer execution to unreachable
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 2 13:41:28 PDT 2021
lebedev.ri added inline comments.
================
Comment at: llvm/test/CodeGen/PowerPC/2007-11-16-landingpad-split.ll:86-87
catch i8* null
call void @llvm.stackrestore(i8* %tmp4)
resume { i8*, i32 } %exn
----------------
What happens here is that `call void @llvm.stackrestore()` ends up being located
right before `unreachable`, and we now happily erase it.
I think that makes sense, because `resume` would cause us to "return" from the function,
freeing all the stack anyways.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105374/new/
https://reviews.llvm.org/D105374
More information about the llvm-commits
mailing list