From 451dcfae31ee09f4a4a40476d3f36b784273fadc Mon Sep 17 00:00:00 2001 From: aartbik Date: Tue, 18 Aug 2020 18:50:33 -0700 Subject: [PATCH] [mlir] [VectorOps] Cleanup mask 1-d test on constants I forgot to address this in previous CL. Sorry about that. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D86188 --- mlir/lib/Dialect/Vector/VectorOps.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mlir/lib/Dialect/Vector/VectorOps.cpp b/mlir/lib/Dialect/Vector/VectorOps.cpp index d69fe96..a0fd7a1 100644 --- a/mlir/lib/Dialect/Vector/VectorOps.cpp +++ b/mlir/lib/Dialect/Vector/VectorOps.cpp @@ -48,10 +48,10 @@ static MaskFormat get1DMaskFormat(Value mask) { // when a mix is detected. if (auto denseElts = c.value().dyn_cast()) { int64_t val = 0; - for (llvm::APInt b : denseElts) - if (b.getBoolValue() && val >= 0) + for (bool b : denseElts.getValues()) + if (b && val >= 0) val++; - else if (!b.getBoolValue() && val <= 0) + else if (!b && val <= 0) val--; else return MaskFormat::Unknown; -- 2.7.4