Skip to content

Commit 28e8695

Browse files
committed
[MLIR] NFC - Fix indentation in examples in LoopOps.td
1 parent 7273284 commit 28e8695

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

mlir/include/mlir/Dialect/LoopOps/LoopOps.td

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def ForOp : Loop_Op<"for",
7979
%sum_0 = constant 0.0 : f32
8080
// iter_args binds initial values to the loop's region arguments.
8181
%sum = loop.for %iv = %lb to %ub step %step iter_args(%sum_iter = %sum_0) -> (f32) {
82-
%t = load %buffer[%iv] : memref<1024xf32>
82+
%t = load %buffer[%iv] : memref<1024xf32>
8383
%sum_next = addf %sum_iter, %t : f32
8484
// Yield current iteration sum to next iteration %sum_iter or to %sum if final iteration.
8585
loop.yield %sum_next : f32
@@ -100,14 +100,14 @@ def ForOp : Loop_Op<"for",
100100
%sum_0 = constant 0.0 : f32
101101
%c0 = constant 0.0 : f32
102102
%sum = loop.for %iv = %lb to %ub step %step iter_args(%sum_iter = %sum_0) -> (f32) {
103-
%t = load %buffer[%iv] : memref<1024xf32>
104-
%cond = cmpf "ugt", %t, %c0 : f32
105-
%sum_next = loop.if %cond -> (f32) {
106-
%new_sum = addf %sum_iter, %t : f32
103+
%t = load %buffer[%iv] : memref<1024xf32>
104+
%cond = cmpf "ugt", %t, %c0 : f32
105+
%sum_next = loop.if %cond -> (f32) {
106+
%new_sum = addf %sum_iter, %t : f32
107107
loop.yield %new_sum : f32
108-
} else {
109-
loop.yield %sum_iter : f32
110-
}
108+
} else {
109+
loop.yield %sum_iter : f32
110+
}
111111
loop.yield %sum_next : f32
112112
}
113113
return %sum : f32

0 commit comments

Comments
 (0)