1// RUN: mlir-opt %s -convert-scf-to-std -convert-vector-to-llvm -convert-std-to-llvm | \ 2// RUN: mlir-cpu-runner -e entry -entry-point-result=void \ 3// RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ 4// RUN: FileCheck %s 5 6func @entry() { 7 %0 = vector.constant_mask [4] : vector<8xi1> 8 vector.print %0 : vector<8xi1> 9 // CHECK: ( 1, 1, 1, 1, 0, 0, 0, 0 ) 10 11 %1 = vector.constant_mask [1, 3] : vector<4x4xi1> 12 vector.print %1 : vector<4x4xi1> 13 // CHECK: ( ( 1, 1, 1, 0 ), ( 0, 0, 0, 0 ), ( 0, 0, 0, 0 ), ( 0, 0, 0, 0 ) ) 14 15 %2 = vector.constant_mask [2, 2] : vector<4x4xi1> 16 vector.print %2 : vector<4x4xi1> 17 // CHECK: ( ( 1, 1, 0, 0 ), ( 1, 1, 0, 0 ), ( 0, 0, 0, 0 ), ( 0, 0, 0, 0 ) ) 18 19 %3 = vector.constant_mask [2, 4] : vector<4x4xi1> 20 vector.print %3 : vector<4x4xi1> 21 // CHECK: ( ( 1, 1, 1, 1 ), ( 1, 1, 1, 1 ), ( 0, 0, 0, 0 ), ( 0, 0, 0, 0 ) ) 22 23 %4 = vector.constant_mask [3, 1] : vector<4x4xi1> 24 vector.print %4 : vector<4x4xi1> 25 // CHECK: ( ( 1, 0, 0, 0 ), ( 1, 0, 0, 0 ), ( 1, 0, 0, 0 ), ( 0, 0, 0, 0 ) ) 26 27 %5 = vector.constant_mask [3, 2] : vector<4x4xi1> 28 vector.print %5 : vector<4x4xi1> 29 // CHECK: ( ( 1, 1, 0, 0 ), ( 1, 1, 0, 0 ), ( 1, 1, 0, 0 ), ( 0, 0, 0, 0 ) ) 30 31 %6 = vector.constant_mask [4, 3] : vector<4x4xi1> 32 vector.print %6 : vector<4x4xi1> 33 // CHECK: ( ( 1, 1, 1, 0 ), ( 1, 1, 1, 0 ), ( 1, 1, 1, 0 ), ( 1, 1, 1, 0 ) ) 34 35 %7 = vector.constant_mask [4, 4] : vector<4x4xi1> 36 vector.print %7 : vector<4x4xi1> 37 // CHECK: ( ( 1, 1, 1, 1 ), ( 1, 1, 1, 1 ), ( 1, 1, 1, 1 ), ( 1, 1, 1, 1 ) ) 38 39 %8 = vector.constant_mask [1, 2, 3] : vector<2x3x4xi1> 40 vector.print %8 : vector<2x3x4xi1> 41 // CHECK: ( ( ( 1, 1, 1, 0 ), ( 1, 1, 1, 0 ), ( 0, 0, 0, 0 ) ), ( ( 0, 0, 0, 0 ), ( 0, 0, 0, 0 ), ( 0, 0, 0, 0 ) ) ) 42 43 %9 = vector.constant_mask [2, 2, 3] : vector<2x3x4xi1> 44 vector.print %9 : vector<2x3x4xi1> 45 // CHECK: ( ( ( 1, 1, 1, 0 ), ( 1, 1, 1, 0 ), ( 0, 0, 0, 0 ) ), ( ( 1, 1, 1, 0 ), ( 1, 1, 1, 0 ), ( 0, 0, 0, 0 ) ) ) 46 47 return 48} 49 50