@@ -198,9 +198,9 @@ static Value exp2I32(ImplicitLocOpBuilder &builder, Value arg) {
198
198
namespace {
199
199
Value makePolynomialCalculation (ImplicitLocOpBuilder &builder,
200
200
llvm::ArrayRef<Value> coeffs, Value x) {
201
- auto width = vectorWidth (x.getType (), isF32);
201
+ auto shape = vectorShape (x.getType (), isF32);
202
202
if (coeffs.size () == 0 ) {
203
- return broadcast (builder, f32Cst (builder, 0 .0f ), *width );
203
+ return broadcast (builder, f32Cst (builder, 0 .0f ), *shape );
204
204
} else if (coeffs.size () == 1 ) {
205
205
return coeffs[0 ];
206
206
}
@@ -509,13 +509,13 @@ Log1pApproximation::matchAndRewrite(math::Log1pOp op,
509
509
LogicalResult
510
510
ErfPolynomialApproximation::matchAndRewrite (math::ErfOp op,
511
511
PatternRewriter &rewriter) const {
512
- auto width = vectorWidth (op.operand ().getType (), isF32);
513
- if (!width .hasValue ())
512
+ auto shape = vectorShape (op.operand ().getType (), isF32);
513
+ if (!shape .hasValue ())
514
514
return rewriter.notifyMatchFailure (op, " unsupported operand type" );
515
515
516
516
ImplicitLocOpBuilder builder (op->getLoc (), rewriter);
517
517
auto bcast = [&](Value value) -> Value {
518
- return broadcast (builder, value, *width );
518
+ return broadcast (builder, value, *shape );
519
519
};
520
520
521
521
const int intervalsCount = 3 ;
0 commit comments