forked from OSchip/llvm-project
[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:
parent
44bdcb889a
commit
44bb5cd80d
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue