From f2b28b4124015718dc4b392e00f4aade4eedc11c Mon Sep 17 00:00:00 2001 From: Alex AUVOLAT Date: Thu, 2 Jan 2014 23:20:01 +0100 Subject: Implement jr/jalr/jer/jner/jltr/jler/jltru/jleru ; add simplification to sched. --- sched/simplify.ml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sched/simplify.ml') diff --git a/sched/simplify.ml b/sched/simplify.ml index 37e4539..c0cd07e 100644 --- a/sched/simplify.ml +++ b/sched/simplify.ml @@ -136,6 +136,14 @@ let arith_simplify p = | Ebinop(Xor, Aconst([|false|]), x) -> Earg(x) | Ebinop(Xor, x, Aconst([|false|])) -> Earg(x) + | Ebinop(Nand, Avar(a), Avar(b)) when a = b -> + Enot(Avar(a)) + | Ebinop(Xor, Avar(a), Avar(b)) when a = b -> + let sz = Env.find a p.p_vars in + Earg(Aconst(Array.make sz false)) + | Ebinop(_, Avar(a), Avar(b)) when a = b -> + Earg(Avar(a)) + | Eslice(i, j, k) when i = j -> Eselect(i, k) | Econcat(Aconst(a), Aconst(b)) -> -- cgit v1.2.3