This adds one LIT test covering 6 lines and 4 branch outcomes that the existing suite does not reach, across 1 source file, at 48615bc5925ef4b9db8b4550b5d4322933cf4b7b.
| Source file | Newly covered lines | Newly covered branch outcomes |
|---|---|---|
lib/Frontend/Lowering/LowerGraphMemoryPass.cpp |
459–460, 736, 739–741 | 459:3–459:45 true; 476:43–476:65 true; 735:11–735:27 true; 738:34–738:35 true |
lib/Frontend/Lowering/LowerGraphMemoryPass.cpp 457 case ::mlir::LLVM::AtomicOrdering::monotonic: 458 return ::dataflow::AtomicOrdering::Monotonic;+459 case ::mlir::LLVM::AtomicOrdering::acquire: [true branch at 459:3]+460 return ::dataflow::AtomicOrdering::Acquire; 461 case ::mlir::LLVM::AtomicOrdering::release: 462 return ::dataflow::AtomicOrdering::Release;@@ 474 convertSyncScope(::mlir::MLIRContext *context, 475 std::optional<::llvm::StringRef> syncscope) {+476 if (!syncscope || syncscope->empty() || *syncscope == "system") [true branch at 476:43] 477 return ::dataflow::SyncScopeRefAttr::get( 478 context, ::dataflow::SyncScopeKind::System);@@ 733 ::llvm::SmallVector<::mlir::LLVM::GEPOp, 8> dead; 734 graph.getBody().walk([&](::mlir::LLVM::GEPOp gep) {+735 if (gep->use_empty()) [true branch at 735:11]+736 dead.push_back(gep); 737 });+738 for (::mlir::LLVM::GEPOp gep : dead) { [true branch at 738:34]+739 gep.erase();+740 changed = true;+741 } 742 } 743 }
The input was reduced from 20 to 18 lines while keeping every covered line and branch outcome above, and while the compiler still accepted it. The CHECK lines are the compiler's exact output on this input at 48615bc5925ef4b9db8b4550b5d4322933cf4b7b.
// RUN: loom-raise-opt --loom-lower-graph-memory --mlir-print-op-generic %s | FileCheck %s
module attributes {
} {
dataflow.graph private @source_memory_graph(
%start: none, %base: !llvm.ptr, %expected: i32, %desired: i32,
%index: i64, %cond: i1) -> ()
attributes {input_segments = array<i32: 5, 0, 0>,
result_segments = array<i32: 0, 0, 0>} {
%ptr = llvm.getelementptr inbounds %base[%index]
: (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<4 x i8>
%lower = arith.constant 0 : index
%upper = arith.constant 4 : index
%step = arith.constant 1 : index
scf.for %iv = %lower to %upper step %step {
llvm.fence syncscope("system") acquire
}
dataflow.graph.return %start : none
}
}
// CHECK: "builtin.module"() ({
// CHECK-NEXT: "dataflow.graph"() <{function_type = (!llvm.ptr, i32, i32, i64, i1, memref<?xi8>) -> (), input_segments = array<i32: 5, 0, 1>, result_segments = array<i32: 0, 0, 0>, sym_name = "source_memory_graph", sym_visibility = "private"}> ({
// CHECK-NEXT: ^bb0(%arg0: none, %arg1: !llvm.ptr, %arg2: i32, %arg3: i32, %arg4: i64, %arg5: i1, %arg6: memref<?xi8>):
// CHECK-NEXT: %0 = "arith.constant"() <{value = 0 : index}> : () -> index
// CHECK-NEXT: %1 = "arith.constant"() <{value = 4 : index}> : () -> index
// CHECK-NEXT: %2 = "arith.constant"() <{value = 1 : index}> : () -> index
// CHECK-NEXT: %3 = "arith.index_cast"(%0) : (index) -> i32
// CHECK-NEXT: %4 = "arith.index_cast"(%1) : (index) -> i32
// CHECK-NEXT: %5 = "arith.index_cast"(%2) : (index) -> i32
// CHECK-NEXT: %6:2 = "dataflow.stream"(%3, %4, %5) <{predicate = 2 : i64, step_kind = 0 : i32}> : (i32, i32, i32) -> (i32, i1)
// CHECK-NEXT: %7 = "dataflow.carry"(%6#1, %arg0, %9) : (i1, none, none) -> none
// CHECK-NEXT: %8:2 = "dataflow.demux"(%6#1, %7) : (i1, none) -> (none, none)
// CHECK-NEXT: %9 = "dataflow.fence"(%8#1) <{contract = #dataflow.fence_contract<ordering = acquire, sync_scope = <system>>}> : (none) -> none
// CHECK-NEXT: "dataflow.graph.return"(%8#0) <{operandSegmentSizes = array<i32: 0, 0, 0, 1>}> : (none) -> ()
// CHECK-NEXT: }) : () -> ()
// CHECK-NEXT: }) : () -> ()
// CHECK-EMPTY:
48615bc5925ef4b9db8b4550b5d4322933cf4b7b.postcondition.spct, SHA-256 840ba12c591c37fe0a0bf28ef27f6f8a496505d00629390bb6209f57e770e9bb).PBT mlir-stage-13-v1, run 20260911-083853, seed 31.
The property under test is anchored on documentation:
docs/spec-compiler-part-3-mem.md lines 482–486 (output side)docs/spec-compiler-part-3-mem.md lines 482–486 (input side)docs/spec-compiler-part-3-mem.md lines 92–97 (input side)docs/spec-compiler-part-3-mem.md lines 148–152 (input side)docs/spec-compiler-part-3-mem.md lines 136–140 (input side)docs/spec-compiler-part-3-mem.md lines 489–493 (input side)docs/spec-compiler-part-3-mem.md lines 3–6 (input side)docs/spec-compiler-part-3-mem.md lines 79–90 (input side)docs/spec-compiler-part-3-mem.md lines 99–106 (input side)docs/spec-compiler-part-3-mem.md lines 389–393 (input side)docs/spec-compiler-part-3-mem.md lines 470–480 (input side)docs/spec-compiler-part-3-mem.md lines 486–489 (input side)docs/spec-compiler-part-3-mem.md lines 142–146 (input side)docs/spec-compiler-part-3-mem.md lines 43–46 (input side)docs/spec-compiler-part-3-mem.md lines 154–157 (input side)docs/spec-compiler-part-3-mem.md lines 382–387 (input side)docs/spec-compiler-part-3-mem.md lines 34–35 (input side)docs/spec-compiler-part-3-mem.md lines 159–161 (input side)docs/spec-compiler-part-3-mem.md lines 40–41 (input side)docs/spec-compiler-part-3-mem.md lines 31–32 (input side)docs/spec-compiler-part-3-mem.md lines 245–251 (input side)Coverage is measured against the recorded baseline suite at this revision, and counts unique mapped file locations including generated code. Reduction retains every added line or branch outcome and a passing property check; it is not a claim of global minimality, nor of a defect.
Originating PBT run · Seed 31
LIT test · PR patch · Native verification