summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Bauereiss2018-06-07 14:02:25 +0100
committerThomas Bauereiss2018-06-07 14:05:27 +0100
commit62d06da409ce249f8aec01faed913220ca11b630 (patch)
treeac3cfdbf67b5ce906c00604facb34476402905cb /src
parent92a158886dd4fa2b5fed6bb9db29c7307a4d07d4 (diff)
Fix a small bug in monomorphisation
Diffstat (limited to 'src')
-rw-r--r--src/monomorphise.ml4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/monomorphise.ml b/src/monomorphise.ml
index eb88072f..f4f28c41 100644
--- a/src/monomorphise.ml
+++ b/src/monomorphise.ml
@@ -3729,6 +3729,7 @@ let rewrite_app env typ (id,args) =
let is_subrange = is_id env (Id "vector_subrange") in
let is_slice = is_id env (Id "slice") in
let is_zeros = is_id env (Id "Zeros") in
+ let is_ones = is_id env (Id "Ones") in
match args with
| (E_aux (E_app (append1,
[E_aux (E_app (subrange1, [vector1; start1; end1]), _);
@@ -3757,7 +3758,8 @@ let rewrite_app env typ (id,args) =
E_app (mk_id "zext_slice", [vector1; start1; length1])
| [E_aux (E_app (ones, [len1]),_);
- _ (* unnecessary ZeroExtend length *)] ->
+ _ (* unnecessary ZeroExtend length *)]
+ when is_ones ones ->
E_app (mk_id "zext_ones", [len1])
| _ -> E_app (id,args)