Skip to content

Commit 451dcfa

Browse files
committed
[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
1 parent 40ae296 commit 451dcfa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mlir/lib/Dialect/Vector/VectorOps.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ static MaskFormat get1DMaskFormat(Value mask) {
4848
// when a mix is detected.
4949
if (auto denseElts = c.value().dyn_cast<DenseIntElementsAttr>()) {
5050
int64_t val = 0;
51-
for (llvm::APInt b : denseElts)
52-
if (b.getBoolValue() && val >= 0)
51+
for (bool b : denseElts.getValues<bool>())
52+
if (b && val >= 0)
5353
val++;
54-
else if (!b.getBoolValue() && val <= 0)
54+
else if (!b && val <= 0)
5555
val--;
5656
else
5757
return MaskFormat::Unknown;

0 commit comments

Comments
 (0)