diff --git a/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp b/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp index 58048869fa2e..e556533cb089 100644 --- a/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp +++ b/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp @@ -2965,8 +2965,8 @@ static int getIntOperandFromRegisterString(StringRef RegString) { // form described in getIntOperandsFromRegsterString) or is a named register // known by the MRS SysReg mapper. bool AArch64DAGToDAGISel::tryReadRegister(SDNode *N) { - const MDNodeSDNode *MD = dyn_cast(N->getOperand(1)); - const MDString *RegString = dyn_cast(MD->getMD()->getOperand(0)); + const auto *MD = cast(N->getOperand(1)); + const auto *RegString = cast(MD->getMD()->getOperand(0)); SDLoc DL(N); int Reg = getIntOperandFromRegisterString(RegString->getString()); @@ -3011,8 +3011,8 @@ bool AArch64DAGToDAGISel::tryReadRegister(SDNode *N) { // form described in getIntOperandsFromRegsterString) or is a named register // known by the MSR SysReg mapper. bool AArch64DAGToDAGISel::tryWriteRegister(SDNode *N) { - const MDNodeSDNode *MD = dyn_cast(N->getOperand(1)); - const MDString *RegString = dyn_cast(MD->getMD()->getOperand(0)); + const auto *MD = cast(N->getOperand(1)); + const auto *RegString = cast(MD->getMD()->getOperand(0)); SDLoc DL(N); int Reg = getIntOperandFromRegisterString(RegString->getString());