summaryrefslogtreecommitdiff
path: root/sched/simplify.ml
diff options
context:
space:
mode:
Diffstat (limited to 'sched/simplify.ml')
-rw-r--r--sched/simplify.ml4
1 files changed, 4 insertions, 0 deletions
diff --git a/sched/simplify.ml b/sched/simplify.ml
index c68fe66..86c4790 100644
--- a/sched/simplify.ml
+++ b/sched/simplify.ml
@@ -143,6 +143,10 @@ let arith_simplify p =
Earg(Aconst(Array.make sz false))
| Ebinop(_, Avar(a), Avar(b)) when a = b ->
Earg(Avar(a))
+
+ | Emux(_, a, b) when a = b -> Earg(a)
+ | Emux(Aconst[|false|], a, b) -> Earg(a)
+ | Emux(Aconst[|true|], a, b) -> Earg(b)
| Eslice(i, j, k) when i = j -> Eselect(i, k)