Skip to content

Commit

Permalink
fix: make simp_alive_peephole work
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasgrosser authored and bollu committed Mar 26, 2024
1 parent 31d4e53 commit 5a03bfe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion SSA/Projects/InstCombine/Tactic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ macro "simp_alive_peephole" : tactic =>
simp (config := {unfoldPartialApp := true, zetaDelta := true}) only [OpDenote.denote,
InstCombine.Op.denote, HVector.toPair, HVector.toTriple, pairMapM, BitVec.Refinement,
bind, Option.bind, pure, Ctxt.DerivedCtxt.ofCtxt, Ctxt.DerivedCtxt.snoc,
Ctxt.snoc,
Ctxt.snoc, Valuation.snoc,
ConcreteOrMVar.instantiate, Vector.get, HVector.toSingle,
LLVM.and?, LLVM.or?, LLVM.xor?, LLVM.add?, LLVM.sub?,
LLVM.mul?, LLVM.udiv?, LLVM.sdiv?, LLVM.urem?, LLVM.srem?,
Expand All @@ -52,6 +52,7 @@ macro "simp_alive_peephole" : tactic =>
try intros v3
try intros v4
try intros v5
simp only [Option.bind, bind, Monad.toBind, Var.casesOn, cast, pairBind, Option.bind_eq_bind]
try cases' v0 with x0 <;> simp[Option.bind, bind, Monad.toBind]
<;> try cases' v1 with x1 <;> simp[Option.bind, bind, Monad.toBind]
<;> try cases' v2 with x2 <;> simp[Option.bind, bind, Monad.toBind]
Expand Down

0 comments on commit 5a03bfe

Please sign in to comment.