[Mlir-commits] [mlir] [MLIR] Properly add operations to blocks during `createOrFold` (PR #70010)

Matthias Springer llvmlistbot at llvm.org
Tue Oct 24 00:50:37 PDT 2023


================
@@ -529,6 +529,10 @@ LogicalResult TestOpWithVariadicResultsAndFolder::fold(
 }
 
 OpFoldResult TestOpInPlaceFold::fold(FoldAdaptor adaptor) {
+  // Excercise the fact that an operation created with createOrFold should be
+  // allowed to enable its block.
+  assert(getBlock() && "expected block to be assigned");
----------------
matthias-springer wrote:

Maybe rephrase as `expected that operation is not unlinked`

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


More information about the Mlir-commits mailing list