Skip to content

Commit

Permalink
[Verif][VerifyClockedAssertLike] Don't crash on blockarg operand.
Browse files Browse the repository at this point in the history
  • Loading branch information
dtzSiFive committed Aug 31, 2024
1 parent 929ffc4 commit ce8c14f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Dialect/Verif/Transforms/VerifyClockedAssertLike.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ struct VerifyClockedAssertLikePass

Operation *property = clockedAssertLikeOp->getOperand(0).getDefiningOp();

if (!property)
return;

// Fill in our worklist
worklist.insert({property, property->operand_begin()});

Expand Down
6 changes: 6 additions & 0 deletions test/Dialect/Verif/verify.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,9 @@ hw.module @deeplynested(in %clk: i1, in %a: i1, in %b: i1) {

verif.clocked_assert %o1 if %b, posedge %clk : !ltl.property
}

// -----

hw.module @clockedarg(in %clocked: !ltl.property, in %a: i1, in %clk: i1) {
verif.clocked_assert %clocked if %a, posedge %clk : !ltl.property
}

0 comments on commit ce8c14f

Please sign in to comment.