Skip to content

Commit

Permalink
use is_splat for LLVM15
Browse files Browse the repository at this point in the history
  • Loading branch information
vchuravy authored and nhaehnle committed Oct 26, 2023
1 parent 12a8c5d commit 48e93dc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Dialect/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ using namespace llvm;
using namespace llvm_dialects;

bool llvm_dialects::areTypesEqual(ArrayRef<Type *> types) {
#if HAVE_LLVM_VERSION_MAJOR >= 16
return llvm::all_equal(types);
#else
return llvm::is_splat(types);
#endif
}

// The following function is copied verbatim from
Expand Down

0 comments on commit 48e93dc

Please sign in to comment.