Skip to content

[WebAssembly] Change placeholder from undef to poison #131536

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1767,7 +1767,7 @@ void WebAssemblyLowerEmscriptenEHSjLj::handleLongjmpableCallsForWasmSjLj(
I->eraseFromParent();

// Add entries for new predecessors to phis in unwind destinations. We use
// 'undef' as a placeholder value. We should make sure the phis have a valid
// 'poison' as a placeholder value. We should make sure the phis have a valid
// set of predecessors before running SSAUpdater, because SSAUpdater
// internally can use existing phis to gather predecessor info rather than
// scanning the actual CFG (See FindPredecessorBlocks in SSAUpdater.cpp for
Expand All @@ -1776,7 +1776,7 @@ void WebAssemblyLowerEmscriptenEHSjLj::handleLongjmpableCallsForWasmSjLj(
for (PHINode &PN : UnwindDest->phis()) {
for (auto *NewPred : NewPreds) {
assert(PN.getBasicBlockIndex(NewPred) == -1);
PN.addIncoming(UndefValue::get(PN.getType()), NewPred);
PN.addIncoming(PoisonValue::get(PN.getType()), NewPred);
}
}
}
Expand Down