[Mlir-commits] [mlir] [mlir][Interfaces] `LoopLikeOpInterface`: Support ops with multiple regions (PR #66754)

Markus Böck llvmlistbot at llvm.org
Tue Sep 19 04:31:00 PDT 2023


================
@@ -929,3 +929,24 @@ func.func @speculate_dynamic_pack_and_unpack(%source: tensor<?x?xf32>,
   }
   return
 }
+
+// -----
+
+// CHECK-LABEL: func @hoist_from_scf_while(
+//   CHECK-DAG:   arith.constant 1 : i32
+//   CHECK-DAG:   arith.constant 10 : i32
+//       CHECK:   scf.while
+//   CHECK-NOT:     arith.constant
----------------
zero9178 wrote:

Not sure whether its worth changing, but hoisting `arith.constant` isn't really interesting for LICM given that `canonicalize` is capable of hoisting them as well. Maybe more complicated pure ops like `arith.cmpi` or `arith.addi` should be tested instead.

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


More information about the Mlir-commits mailing list