[llvm] [WebAssembly] Remove an unnecessary variable (NFC) (PR #224962)
Heejin Ahn via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 20 13:12:35 PDT 2026
https://github.com/aheejin created https://github.com/llvm/llvm-project/pull/224962
That `CPI` had a use when first written in https://github.com/llvm/llvm-project/commit/99d60e0dabcf20f4db683da83cde905b7a1373de but after https://github.com/llvm/llvm-project/commit/445f4e74841e87da06743a4c126b09c9b9b05124 it's not necessary to cast it anymore.
>From 7391310c2d88a94947fdc6cd1872edaa5050e69c Mon Sep 17 00:00:00 2001
From: Heejin Ahn <aheejin at gmail.com>
Date: Sun, 20 Sep 2026 09:11:48 +0000
Subject: [PATCH] [WebAssembly] Remove an unnecessary variable (NFC)
That `CPI` had a use when first written in
https://github.com/llvm/llvm-project/commit/99d60e0dabcf20f4db683da83cde905b7a1373de
but after
https://github.com/llvm/llvm-project/commit/445f4e74841e87da06743a4c126b09c9b9b05124
it's not necessary to cast it anymore.
---
llvm/lib/CodeGen/WasmEHPrepare.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/llvm/lib/CodeGen/WasmEHPrepare.cpp b/llvm/lib/CodeGen/WasmEHPrepare.cpp
index 54c6dcfd052e0..8e9acc4688c5f 100644
--- a/llvm/lib/CodeGen/WasmEHPrepare.cpp
+++ b/llvm/lib/CodeGen/WasmEHPrepare.cpp
@@ -347,7 +347,6 @@ void WasmEHPrepareImpl::prepareEHPad(BasicBlock *BB, bool NeedPersonality,
// Pseudocode: __wasm_lpad_context.lpad_index = index;
IRB.CreateStore(IRB.getInt32(Index), LPadIndexField);
- auto *CPI = cast<CatchPadInst>(FPI);
// TODO Sometimes storing the LSDA address every time is not necessary, in
// case it is already set in a dominating EH pad and there is no function call
// between from that EH pad to here. Consider optimizing those cases.
@@ -356,7 +355,7 @@ void WasmEHPrepareImpl::prepareEHPad(BasicBlock *BB, bool NeedPersonality,
// Pseudocode: personality_fn(exn);
CallInst *PersCI =
- IRB.CreateCall(PersonalityF, CatchCI, OperandBundleDef("funclet", CPI));
+ IRB.CreateCall(PersonalityF, CatchCI, OperandBundleDef("funclet", FPI));
PersCI->setDoesNotThrow();
// Pseudocode: int selector = __wasm_lpad_context.selector;
More information about the llvm-commits
mailing list