diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index 6c5af40..134194c 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -4570,8 +4570,8 @@ void CWriter::printIntrinsicDefinition(FunctionType *funT, unsigned Opcode, printTypeName(Out, retT); Out << " r;\n"; - if (isa(retT)) { - char vectorSize = dyn_cast(retT)->getNumElements(); + if (auto vRetT = dyn_cast(retT)) { + char vectorSize = vRetT->getElementCount().getKnownMinValue(); for (i = 0; i < vectorSize; i++) { Out << " r.vector[" << (int)i << "] = " << OpName << "_devec("; for (char j = 0; j < numParams; j++) {