1 // RUN: mlir-opt %s --transform-interpreter --split-input-file | FileCheck %s
3 func.func @select_single_i1_vector(%cond : i1) -> vector<1xi1> {
4 %true = arith.constant dense<true> : vector<1xi1>
5 %false = arith.constant dense<false> : vector<1xi1>
6 %select = arith.select %cond, %true, %false : i1, vector<1xi1>
7 return %select : vector<1xi1>
10 module attributes {transform.with_named_sequence} {
11 transform.named_sequence @__transform_main(%root : !transform.any_op {transform.readonly}) {
12 %func_op = transform.structured.match ops{["func.func"]} in %root : (!transform.any_op) -> !transform.op<"func.func">
13 transform.apply_patterns to %func_op {
14 transform.apply_patterns.vector.materialize_masks
15 } : !transform.op<"func.func">
20 // CHECK-LABEL: func @select_single_i1_vector
21 // CHECK-SAME: %[[COND:.*]]: i1
22 // CHECK: %[[BCAST:.*]] = vector.broadcast %[[COND]] : i1 to vector<1xi1>
23 // CHECK: return %[[BCAST]] : vector<1xi1>