For example, we could do the following eliminations:
fold vector.shuffle V1, V2, [0, 1, 2, 3] : <4xi32>, <2xi32> -> V1 fold vector.shuffle V1, V2, [4, 5] : <4xi32>, <2xi32> -> V2
Differential D122706
[mlir][Vector] Fold ShuffleOp if result is identical to one of source vectors. jacquesguan on Mar 30 2022, 1:01 AM. Authored by
Details For example, we could do the following eliminations: fold vector.shuffle V1, V2, [0, 1, 2, 3] : <4xi32>, <2xi32> -> V1 fold vector.shuffle V1, V2, [4, 5] : <4xi32>, <2xi32> -> V2
Diff Detail
Event TimelineComment Actions Thanks!
Comment Actions Hi @jacquesguan , This change has caused a build error when building with clang: /usr/bin/clang++ -DGTEST_HAS_RTTI=0 -DMLIR_CUDA_CONVERSIONS_ENABLED=0 -DMLIR_ROCM_CONVERSIONS_ENABLED=0 -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/mnt/vss/_work/1/b/llvm/Release/tools/mlir/lib/Dialect/Vector/IR -I/mnt/vss/_work/1/llvm-project/mlir/lib/Dialect/Vector/IR -I/mnt/vss/_work/1/b/llvm/Release/include -I/mnt/vss/_work/1/llvm-project/llvm/include -I/mnt/vss/_work/1/llvm-project/mlir/include -I/mnt/vss/_work/1/b/llvm/Release/tools/mlir/include -fPIC -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -Werror=mismatched-tags -Werror=global-constructors -O3 -DNDEBUG -fno-exceptions -fno-rtti -UNDEBUG -std=c++14 -MD -MT tools/mlir/lib/Dialect/Vector/IR/CMakeFiles/obj.MLIRVector.dir/VectorOps.cpp.o -MF tools/mlir/lib/Dialect/Vector/IR/CMakeFiles/obj.MLIRVector.dir/VectorOps.cpp.o.d -o tools/mlir/lib/Dialect/Vector/IR/CMakeFiles/obj.MLIRVector.dir/VectorOps.cpp.o -c /mnt/vss/_work/1/llvm-project/mlir/lib/Dialect/Vector/IR/VectorOps.cpp /mnt/vss/_work/1/llvm-project/mlir/lib/Dialect/Vector/IR/VectorOps.cpp:1793:24: error: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int64_t' (aka 'long') [-Werror,-Wsign-compare] return idxArr.size() == width && ~~~~~~~~~~~~~ ^ ~~~~~ /mnt/vss/_work/1/llvm-project/mlir/lib/Dialect/Vector/IR/VectorOps.cpp:1796:52: error: comparison of integers of different signs: 'uint64_t' (aka 'unsigned long') and 'int64_t' (aka 'long') [-Werror,-Wsign-compare] return attr.getZExtValue() == expected++; ~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~ Thanks, Henry |
Note: we use snakeCase for function and variable names in he MLIR coding style: