[RISC] Replace dyn_casts that are only checked by an assert with a cast. NFC

This commit is contained in:
Craig Topper 2021-01-16 20:23:41 -08:00
parent 633c5afccf
commit 97f7e4e8c9
1 changed files with 1 additions and 5 deletions

View File

@ -284,11 +284,7 @@ static bool verifyDagOpCount(CodeGenInstruction &Inst, DagInit *Dag,
}
static bool validateArgsTypes(Init *Arg1, Init *Arg2) {
DefInit *Type1 = dyn_cast<DefInit>(Arg1);
DefInit *Type2 = dyn_cast<DefInit>(Arg2);
assert(Type1 && ("Arg1 type not found\n"));
assert(Type2 && ("Arg2 type not found\n"));
return Type1->getDef() == Type2->getDef();
return cast<DefInit>(Arg1)->getDef() == cast<DefInit>(Arg2)->getDef();
}
// Creates a mapping between the operand name in the Dag (e.g. $rs1) and