You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to build llvm 16.0.0 for Arm32 and asserts enabled fails with:
In file included from /usr/include/c++/12.2.0/cassert:44, from /home/users/builder/rpm/BUILD/llvm-16.0.0.src/include/llvm/ADT/STLExtras.h:29, from /home/users/builder/rpm/BUILD/llvm-16.0.0.src/tools/mlir/include/mlir/Support/TypeID.h:20, from /home/users/builder/rpm/BUILD/llvm-16.0.0.src/tools/mlir/include/mlir/IR/MLIRContext.h:13, from /home/users/builder/rpm/BUILD/llvm-16.0.0.src/tools/mlir/include/mlir/IR/DialectRegistry.h:16, from /home/users/builder/rpm/BUILD/llvm-16.0.0.src/tools/mlir/include/mlir/IR/Dialect.h:16, from /home/users/builder/rpm/BUILD/llvm-16.0.0.src/tools/mlir/include/mlir/IR/OpDefinition.h:22, from /home/users/builder/rpm/BUILD/llvm-16.0.0.src/tools/mlir/include/mlir/IR/Builders.h:12, from /home/users/builder/rpm/BUILD/llvm-16.0.0.src/tools/mlir/include/mlir/IR/PatternMatch.h:12, from /home/users/builder/rpm/BUILD/llvm-16.0.0.src/tools/mlir/include/mlir/Conversion/VectorToSCF/VectorToSCF.h:12, from /home/users/builder/rpm/BUILD/llvm-16.0.0.src/tools/mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h:14, from /home/users/builder/rpm/BUILD/llvm-16.0.0.src/tools/mlir/include/mlir/Dialect/Linalg/Passes.h:16, from /home/users/builder/rpm/BUILD/llvm-16.0.0.src/tools/mlir/lib/Dialect/Linalg/Transforms/DataLayoutPropagation.cpp:9: /home/users/builder/rpm/BUILD/llvm-16.0.0.src/include/llvm/ADT/STLExtras.h: In instantiation of 'llvm::detail::zippy<llvm::detail::zip_first, T, U, Args ...> llvm::zip_equal(T&&, U&&, Args&& ...) [with T = iota_range<long long int>; U = ArrayRef<long long int>&; Args = {SmallVector<mlir::OpFoldResult, 13>}]':/home/users/builder/rpm/BUILD/llvm-16.0.0.src/tools/mlir/lib/Dialect/Linalg/Transforms/DataLayoutPropagation.cpp:58:23: required from here/home/users/builder/rpm/BUILD/llvm-16.0.0.src/include/llvm/ADT/STLExtras.h:894:19: error: no matching function for call to 'all_equal(<brace-enclosed initializer list>)' 894 | assert(all_equal({std::distance(adl_begin(t), adl_end(t)), | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 895 | std::distance(adl_begin(u), adl_end(u)), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 896 | std::distance(adl_begin(args), adl_end(args))...}) && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/users/builder/rpm/BUILD/llvm-16.0.0.src/include/llvm/ADT/STLExtras.h:1986:28: note: candidate: 'template<class T> bool llvm::all_equal(std::initializer_list<_Tp>)' 1986 | template <typename T> bool all_equal(std::initializer_list<T> Values) { | ^~~~~~~~~/home/users/builder/rpm/BUILD/llvm-16.0.0.src/include/llvm/ADT/STLExtras.h:1986:28: note: template argument deduction/substitution failed:/home/users/builder/rpm/BUILD/llvm-16.0.0.src/include/llvm/ADT/STLExtras.h:894:19: note: deduced conflicting types for parameter '_Tp' ('long long int' and 'int') 894 | assert(all_equal({std::distance(adl_begin(t), adl_end(t)), | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 895 | std::distance(adl_begin(u), adl_end(u)), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 896 | std::distance(adl_begin(args), adl_end(args))...}) && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
That's because zip_equal assumes difference_type of all 3 input parameters are the same and passes them to all_equal:
Trying to build
llvm 16.0.0
for Arm32 and asserts enabled fails with:That's because
zip_equal
assumesdifference_type
of all 3 input parameters are the same and passes them toall_equal
:llvm-project/llvm/include/llvm/ADT/STLExtras.h
Lines 939 to 941 in a6a788b
However on 32-bit platforms
difference_type
of first argument (iota_range
) isintmax_t
thereforelong long int
while for the other two it'sint
.The text was updated successfully, but these errors were encountered: