Fix "incorrect" assertions in Linalg/EDSC/Builders.cpp (NFC)
authorMehdi Amini <joker.eph@gmail.com>
Fri, 30 Oct 2020 05:16:59 +0000 (05:16 +0000)
committerMehdi Amini <joker.eph@gmail.com>
Fri, 30 Oct 2020 05:16:59 +0000 (05:16 +0000)
It is semantically equivalent, but the intent was really lost there.
This fixes a warning/error from MSVC as well, see PR48013

mlir/lib/Dialect/Linalg/EDSC/Builders.cpp

index 20522fe..366aa0f 100644 (file)
@@ -114,7 +114,7 @@ Operation *mlir::edsc::ops::linalg_generic_pointwise(
   SmallVector<IteratorType, 4> iterTypes(O.getExprs().size(),
                                          IteratorType::Parallel);
   auto fun = [&unaryOp](ValueRange args) {
-    assert(!args.empty() >= 1 && "expected >= 1 block arguments");
+    assert(!args.empty() && "expected >= 1 block arguments");
     Value a(args[0]);
     linalg_yield(unaryOp(a));
   };