[mlir] Fix a warning

This patch fixes:

  mlir/lib/Dialect/Arithmetic/Transforms/ExpandOps.cpp:161:52: error:
  'static_assert' with no message is a C++17 extension
  [-Werror,-Wc++17-extensions]
This commit is contained in:
Kazu Hirata 2022-01-12 12:31:43 -08:00
parent 44bdcb889a
commit 44bb5cd80d
1 changed files with 2 additions and 1 deletions

View File

@ -158,7 +158,8 @@ public:
Location loc = op.getLoc();
// If any operand is NaN, 'cmp' will be true (and 'select' returns 'lhs').
static_assert(pred == arith::CmpFPredicate::UGT ||
pred == arith::CmpFPredicate::ULT);
pred == arith::CmpFPredicate::ULT,
"pred must be either UGT or ULT");
Value cmp = rewriter.create<arith::CmpFOp>(loc, pred, lhs, rhs);
Value select = rewriter.create<SelectOp>(loc, cmp, lhs, rhs);