Lines Matching defs:splat

173 /// Check if `write` is of a constant splat and the masked `read` is padded with
174 /// the same splat value -- meaning it could be the same value as the initial
175 /// constant splat.
180 // Check if the masks are consistent. The splat value could be the same if the
181 // read is masked (and padded with the splat value), and the write is unmasked
188 // Check for constant splat (as the source of the write).
195 // The padding of the read and the constant splat value must be the same.
1255 // Fold extractelement (splat X) -> X.
1256 if (auto splat = getVector().getDefiningOp<vector::SplatOp>())
1257 return splat.getInput();
1676 // If splat or broadcast from a scalar, just return the source scalar.
2069 // Pattern to rewrite a ExtractOp(splat ConstantOp) -> ConstantOp.
2076 // Return if 'ExtractOp' operand is not defined by a splat vector
2082 auto splat = llvm::dyn_cast<SplatElementsAttr>(vectorCst);
2083 if (!splat)
2085 TypedAttr newAttr = splat.getSplatValue<TypedAttr>();
2093 // Pattern to rewrite a ExtractOp(non-splat ConstantOp)[...] -> ConstantOp.
2116 // The splat case is handled by `ExtractOpSplatConstantFolder`.
2319 /// Rewrite a vector.from_elements into a vector.splat if all elements are the
2323 /// ==> rewrite to vector.splat %a : vector<3xf32>
3738 // Pattern to rewrite a ExtractStridedSliceOp(splat ConstantOp) -> ConstantOp.
3746 // Return if 'ExtractStridedSliceOp' operand is not defined by a splat
3753 auto splat = llvm::dyn_cast<SplatElementsAttr>(vectorCst);
3754 if (!splat)
3758 splat.getSplatValue<Attribute>());
3765 // Pattern to rewrite a ExtractStridedSliceOp(non-splat ConstantOp) ->
3774 // Return if 'ExtractStridedSliceOp' operand is not defined by a non-splat
3781 // The splat case is handled by `StridedSliceSplatConstantFolder`.
3883 auto splat = op.getVector().getDefiningOp<SplatOp>();
3884 if (!splat)
3886 rewriter.replaceOpWithNewOp<SplatOp>(op, op.getType(), splat.getInput());
5582 // Pattern to rewrite a ShapeCast(splat ConstantOp) -> ConstantOp.
5593 // Only handle splat for now.
5822 auto splat = floatPack.getSplatValue<FloatAttr>();
5827 splat.getValue().bitcastToAPInt().getZExtValue());
5839 auto splat = intPack.getSplatValue<IntegerAttr>();
5847 APInt intBits = splat.getValue().zext(dstBitWidth);
5932 // Eliminate splat constant transpose ops.
6036 // Folds transpose(splat x : src_type) : res_type into splat x : res_type.
6598 // SplatElementsAttr::get treats single value for second arg as being a splat.