[llvm] [EarlyCSE] Fix dead store elimination for unwinding readnone calls (PR #145287)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 23 02:32:17 PDT 2025
================
@@ -1525,6 +1525,11 @@ bool EarlyCSE::processNode(DomTreeNode *Node) {
}
}
+ // Make sure stores prior to a potential unwind are not removed, as the
+ // caller may read the memory.
+ if (Inst.mayThrow())
----------------
nikic wrote:
I think so. It's the default for intrinsics.
https://github.com/llvm/llvm-project/pull/145287
More information about the llvm-commits
mailing list