Loading
[mlir][VectorOps] Add fold `ExtractOp(CreateMask) -> CreateMask` (#69456)
This allows folding extracts from `vector.create_mask` ops that have a known value. Currently, there's no fold for this, but you get the same effect from the unrolling in LowerVectorMask (part of -convert-vector-to-llvm), then folds after that. However, for a future patch, this simplification needs to be done before lowering to LLVM, hence the need for this fold. E.g.: ``` %0 = vector.create_mask %c1, %dimA, %dimB : vector<1x[4]x[4]xi1> %1 = vector.extract %mask[0] : vector<[4]x[4]xi1> ``` -> ``` %0 = vector.create_mask %dimA, %dimB : vector<[4]x[4]xi1> ```