[Mlir-commits] [mlir] [mlir] Add transformation to wrap scf::while in zero-trip-check (PR #81050)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Feb 8 14:07:53 PST 2024


================
@@ -183,8 +183,12 @@ FailureOr<ForOp> pipelineForLoop(RewriterBase &rewriter, ForOp forOp,
                                  bool *modifiedIR = nullptr);
 
 /// Create zero-trip-check around a `while` op and return the new loop op in the
-/// check. The while loop is rotated to avoid evaluating the condition twice. It
-/// turns:
+/// check. The while loop is rotated to avoid evaluating the condition twice
----------------
MaheshRavishankar wrote:

Just to future proof, maybe a good idea to return the `if` generated as well.

https://github.com/llvm/llvm-project/pull/81050


More information about the Mlir-commits mailing list