mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-23 13:50:11 +00:00
Apply clang-tidy fixes for readability-simplify-boolean-expr to MLIR (NFC)
This commit is contained in:
parent
03e6d10cac
commit
e1f389a89f
@ -328,9 +328,7 @@ static bool isDivisibleBySymbol(AffineExpr expr, unsigned symbolPos,
|
||||
"unexpected opKind");
|
||||
switch (expr.getKind()) {
|
||||
case AffineExprKind::Constant:
|
||||
if (expr.cast<AffineConstantExpr>().getValue())
|
||||
return false;
|
||||
return true;
|
||||
return expr.cast<AffineConstantExpr>().getValue() == 0;
|
||||
case AffineExprKind::DimId:
|
||||
return false;
|
||||
case AffineExprKind::SymbolId:
|
||||
|
@ -65,10 +65,7 @@ static void applyFoldConstantExtractSlicePatterns(FuncOp funcOp) {
|
||||
|
||||
auto resultType = op.result().getType().cast<ShapedType>();
|
||||
constexpr int64_t kConstantFoldingMaxNumElements = 1024;
|
||||
if (resultType.getNumElements() > kConstantFoldingMaxNumElements)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
return resultType.getNumElements() <= kConstantFoldingMaxNumElements;
|
||||
};
|
||||
|
||||
tensor::populateFoldConstantExtractSlicePatterns(patterns, controlFn);
|
||||
|
Loading…
Reference in New Issue
Block a user