[llvm] [LLVM] remove redundant uses of dyn_cast (NFC) (PR #189105)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 27 14:52:01 PDT 2026
================
@@ -7655,7 +7655,7 @@ static bool isARMMCExpr(MCParsedAsmOperand &MCOp) {
const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(Op.getImm());
if (CE)
return false;
- const MCExpr *E = dyn_cast<MCExpr>(Op.getImm());
+ const MCExpr *E = Op.getImm();
if (!E)
return false;
----------------
nikic wrote:
Previously this was checking for an (impossible) dyn_cast failure, so I think it the null check should be dropped.
https://github.com/llvm/llvm-project/pull/189105
More information about the llvm-commits
mailing list