diff options
| author | Luc Maranget <luc.maranget@inria.fr> | 2001-04-30 18:51:44 +0000 |
|---|---|---|
| committer | Luc Maranget <luc.maranget@inria.fr> | 2001-04-30 18:51:44 +0000 |
| commit | 62cf939f0d6339cd10de181fc00bc87fd3c75783 (patch) | |
| tree | 7a88a742aa34fd5e2d83a239a44e50bae59ee718 | |
| parent | 046e095ec2d93ac8d5a60f1a6933bb51cdf1ded0 (diff) | |
| download | ocaml-62cf939f0d6339cd10de181fc00bc87fd3c75783.tar.gz | |
more tests against zero
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3496 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
| -rw-r--r-- | bytecomp/switch.ml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bytecomp/switch.ml b/bytecomp/switch.ml index f14d5a64bc..63d3f80086 100644 --- a/bytecomp/switch.ml +++ b/bytecomp/switch.ml @@ -562,7 +562,11 @@ let rec c_test konst ctx ({cases=cases ; actions=actions} as s) = let left = {s with cases=left} and right = {s with cases=right} in - if less_tests cright cleft then + if i=1 && (lim+ctx.off)=1 && get_low cases 0+ctx.off=0 then + make_if_ne konst + ctx.arg 0 + (c_test konst ctx right) (c_test konst ctx left) + else if less_tests cright cleft then make_if_lt konst ctx.arg (lim+ctx.off) (c_test konst ctx left) (c_test konst ctx right) |
