Skip to content

Commit

Permalink
use getElementCount().getKnownMinValue() for llvm17
Browse files Browse the repository at this point in the history
  • Loading branch information
tonitick committed Apr 28, 2024
1 parent 951dcd1 commit 12b0848
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Target/CBackend/CBackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4570,8 +4570,8 @@ void CWriter::printIntrinsicDefinition(FunctionType *funT, unsigned Opcode,
printTypeName(Out, retT);
Out << " r;\n";

if (isa<VectorType>(retT)) {
char vectorSize = dyn_cast<VectorType>(retT)->getNumElements();
if (auto vRetT = dyn_cast<VectorType>(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++) {
Expand Down

0 comments on commit 12b0848

Please sign in to comment.