diff --git a/mlir/lib/TableGen/Pattern.cpp b/mlir/lib/TableGen/Pattern.cpp
--- a/mlir/lib/TableGen/Pattern.cpp
+++ b/mlir/lib/TableGen/Pattern.cpp
@@ -54,9 +54,7 @@
   return isSubClassOf("EnumAttrCaseInfo");
 }
 
-bool DagLeaf::isStringAttr() const {
-  return isa<llvm::StringInit>(def);
-}
+bool DagLeaf::isStringAttr() const { return isa<llvm::StringInit>(def); }
 
 Constraint DagLeaf::getAsConstraint() const {
   assert((isOperandMatcher() || isAttrMatcher()) &&
@@ -122,8 +120,9 @@
 bool DagNode::isOperation() const {
   // Treat OpWithResultTypeBuilders as an Operator so that it inherits all the
   // logic of using Operators inside patterns.
-  return isOpWithResultTypeBuilders() || (!isNativeCodeCall()
-      && !isReplaceWithValue() && !isLocationDirective());
+  return isOpWithResultTypeBuilders() ||
+         (!isNativeCodeCall() && !isReplaceWithValue() &&
+          !isLocationDirective());
 }
 
 llvm::StringRef DagNode::getNativeCodeTemplate() const {
@@ -157,11 +156,11 @@
 }
 
 SmallVector<DagNode, 1> DagNode::getOpResultTypeBuilders() const {
-  assert(isOpWithResultTypeBuilders()
-      && "the DAG node must be OpWithResultTypeBuilders");
+  assert(isOpWithResultTypeBuilders() &&
+         "the DAG node must be OpWithResultTypeBuilders");
   llvm::ListInit *builderDefs = cast<llvm::DefInit>(node->getOperator())
-      ->getDef()
-      ->getValueAsListInit("typeBuilders");
+                                    ->getDef()
+                                    ->getValueAsListInit("typeBuilders");
   SmallVector<DagNode, 1> builders;
   for (auto *builderDef : *builderDefs)
     builders.push_back(DagNode(cast<llvm::DagInit>(builderDef)));
diff --git a/mlir/tools/mlir-tblgen/RewriterGen.cpp b/mlir/tools/mlir-tblgen/RewriterGen.cpp
--- a/mlir/tools/mlir-tblgen/RewriterGen.cpp
+++ b/mlir/tools/mlir-tblgen/RewriterGen.cpp
@@ -1080,8 +1080,8 @@
   bool useFirstAttr =
       resultOp.getTrait("::mlir::OpTrait::FirstAttrDerivedResultType");
 
-  if (!tree.isOpWithResultTypeBuilders()
-      && (isSameOperandsAndResultType || useFirstAttr)) {
+  if (!tree.isOpWithResultTypeBuilders() &&
+      (isSameOperandsAndResultType || useFirstAttr)) {
     // We know how to deduce the result type for ops with these traits and we've
     // generated builders taking aggregate parameters. Use those builders to
     // create the ops.
@@ -1098,8 +1098,8 @@
 
   bool usePartialResults = valuePackName != resultValue;
 
-  if (!tree.isOpWithResultTypeBuilders()
-      && (usePartialResults || depth > 0 || resultIndex < 0)) {
+  if (!tree.isOpWithResultTypeBuilders() &&
+      (usePartialResults || depth > 0 || resultIndex < 0)) {
     // For these cases (broadcastable ops, op results used both as auxiliary
     // values and replacement values, ops in nested patterns, auxiliary ops), we
     // still need to supply the result types when building the op. But because