31 lines · plain
1// Ensure that ConvertVectorToLLVMPass options remain serialisable.2 3// This test also allows us to exercise these options (to some extent) even if we4// don't use them in other Vector to LLVM conversion tests. This is quite relevant5// for the `Vector` Dialect (and `--convert-vector-to-llvm` pass) as in many cases6// we use the Transform Dialect (TD) rather than `--convert-vector-to-llvm` for7// testing. So here we don't check the correctness of the passes, as they're8// covered by other tests that use TD, but we still provide some test coverage of9// these pass options.10 11// We don't need to actually parse any IR to print the pass options. We just need12// to provide --dump-pass-pipeline13 14// RUN: mlir-opt --convert-vector-to-llvm --dump-pass-pipeline %s 2>&1 | FileCheck %s --check-prefix=DEFAULT15 16// RUN: mlir-opt --convert-vector-to-llvm='vector-contract-lowering=llvmintr vector-transpose-lowering=llvmintr' \17// RUN: --dump-pass-pipeline %s 2>&1 | FileCheck %s --check-prefix=NON-DEFAULT18 19// CHECK: builtin.module(20// CHECK-SAME: convert-vector-to-llvm{21// CHECK-SAME: enable-amx={{[aA-zZ0-9]+}}22// CHECK-SAME: enable-arm-neon={{[aA-zZ0-9]+}}23// CHECK-SAME: enable-arm-sve={{[aA-zZ0-9]+}}24// CHECK-SAME: enable-x86vector={{[aA-zZ0-9]+}}25// CHECK-SAME: force-32bit-vector-indices={{[aA-zZ0-9]+}}26// CHECK-SAME: reassociate-fp-reductions={{[aA-zZ0-9]+}}27// DEFAULT: vector-contract-lowering=dot28// DEFAULT: vector-transpose-lowering=eltwise29// NON-DEFAULT: vector-contract-lowering=llvm30// NON-DEFAULT: vector-transpose-lowering=llvm31