[Mlir-commits] [mlir] [mlir] Don't hoist transfers from potentially zero trip loops (PR #112752)

Andrzej WarzyƄski llvmlistbot at llvm.org
Fri Oct 18 06:20:41 PDT 2024


================
@@ -308,6 +308,61 @@ module attributes {transform.with_named_sequence} {
 
 // -----
 
+// CHECK-LABEL:  func.func @no_hoisting_zero_trip_loop
+func.func @no_hoisting_zero_trip_loop(%arg0: memref<20xi32>, %lb: index, %ub: index) {
----------------
banach-space wrote:

You are testing 3 different cases in this one function. Could you instead split this into 3 separate, self-contained functions? IMHO, that would be more in line with the [best practices](https://mlir.llvm.org/getting_started/TestingGuide/#filecheck-best-practices):

> FileCheck tests should be as self-contained as possible and focus on testing the minimal set of functionalities needed.

In fact, other tests in this file also focus on testing one-loop nest per function. 

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


More information about the Mlir-commits mailing list