diff --git a/llvm/lib/Target/Mips/MipsISelLowering.cpp b/llvm/lib/Target/Mips/MipsISelLowering.cpp --- a/llvm/lib/Target/Mips/MipsISelLowering.cpp +++ b/llvm/lib/Target/Mips/MipsISelLowering.cpp @@ -3948,7 +3948,7 @@ break; case 'f': // FPU or MSA register if (Subtarget.hasMSA() && type->isVectorTy() && - cast(type)->getBitWidth() == 128) + type->getPrimitiveSizeInBits().getFixedSize() == 128) weight = CW_Register; else if (type->isFloatTy()) weight = CW_Register;