diff --git a/src/CodeGen_Internal.cpp b/src/CodeGen_Internal.cpp index cf74bc620d7e..ccfbb491c37e 100644 --- a/src/CodeGen_Internal.cpp +++ b/src/CodeGen_Internal.cpp @@ -152,10 +152,14 @@ llvm::Type *get_vector_element_type(llvm::Type *t) { } } -#if LLVM_VERSION >= 110 +#if LLVM_VERSION >= 120 const llvm::ElementCount element_count(int e) { return llvm::ElementCount::getFixed(e); } +#elif LLVM_VERSION >= 110 +const llvm::ElementCount element_count(int e) { + return llvm::ElementCount(e, /*scalable*/ false); +} #else int element_count(int e) { return e;