[llvm] cf0f288 - [TableGen] Tiny enhancement
Serge Pavlov via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 22 22:49:35 PDT 2021
Author: Serge Pavlov
Date: 2021-03-23T12:49:05+07:00
New Revision: cf0f2884a1d966b271e10e9d548cee5279db89ee
URL: https://github.com/llvm/llvm-project/commit/cf0f2884a1d966b271e10e9d548cee5279db89ee
DIFF: https://github.com/llvm/llvm-project/commit/cf0f2884a1d966b271e10e9d548cee5279db89ee.diff
LOG: [TableGen] Tiny enhancement
Differential Revision: https://reviews.llvm.org/D99057
Added:
Modified:
llvm/utils/TableGen/PseudoLoweringEmitter.cpp
Removed:
################################################################################
diff --git a/llvm/utils/TableGen/PseudoLoweringEmitter.cpp b/llvm/utils/TableGen/PseudoLoweringEmitter.cpp
index 2e53e247eb99..6acb630299c1 100644
--- a/llvm/utils/TableGen/PseudoLoweringEmitter.cpp
+++ b/llvm/utils/TableGen/PseudoLoweringEmitter.cpp
@@ -109,8 +109,7 @@ addDagOperandMapping(Record *Rec, DagInit *Dag, CodeGenInstruction &Insn,
OperandMap[BaseIdx + i].Data.Imm = II->getValue();
++OpsAdded;
} else if (auto *BI = dyn_cast<BitsInit>(Dag->getArg(i))) {
- auto II = dyn_cast<IntInit>(BI->convertInitializerTo(IntRecTy::get()));
- assert(II && "Cannot convert to integer initializer");
+ auto *II = cast<IntInit>(BI->convertInitializerTo(IntRecTy::get()));
OperandMap[BaseIdx + i].Kind = OpData::Imm;
OperandMap[BaseIdx + i].Data.Imm = II->getValue();
++OpsAdded;
More information about the llvm-commits
mailing list