From: Geoffrey Martin-Noble Date: Wed, 29 May 2019 23:06:49 +0000 (-0700) Subject: Check for Vector or Tensor Type rather than ShapedType when matching constant... X-Git-Tag: llvmorg-11-init~1466^2~1557 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=17022b1bc516f42d8bdb5d0fed9739fb7584e13d;p=platform%2Fupstream%2Fllvm.git Check for Vector or Tensor Type rather than ShapedType when matching constant splat Only vectors or tensors can be constant splats (or element attrs). This is in preparation for making MemRef subclass ShapedType -- PiperOrigin-RevId: 250586281 --- diff --git a/mlir/include/mlir/IR/Matchers.h b/mlir/include/mlir/IR/Matchers.h index d1c2f94..61796ff 100644 --- a/mlir/include/mlir/IR/Matchers.h +++ b/mlir/include/mlir/IR/Matchers.h @@ -101,7 +101,7 @@ struct constant_int_op_binder { if (type.isa()) { return attr_value_binder(bind_value).match(attr); } - if (type.isa()) { + if (type.isa() || type.isa()) { if (auto splatAttr = attr.dyn_cast()) { return attr_value_binder(bind_value) .match(splatAttr.getValue());