ARM64 selection.ml: rewrite to silence warning 57 (ambiguous guarded pattern)

Was causing compilation to abort, in conjunction with -warn-error.
master
Xavier Leroy 2016-03-21 14:57:29 +01:00
parent 19727817c2
commit 30ceee3afd
1 changed files with 4 additions and 1 deletions

View File

@ -126,7 +126,10 @@ method! select_operation op args =
| Caddi | Caddv | Cadda ->
begin match args with
(* Add immediate *)
| [arg; Cconst_int n] | [Cconst_int n; arg] when self#is_immediate n ->
| [arg; Cconst_int n] when self#is_immediate n ->
((if n >= 0 then Iintop_imm(Iadd, n) else Iintop_imm(Isub, -n)),
[arg])
| [Cconst_int n; arg] when self#is_immediate n ->
((if n >= 0 then Iintop_imm(Iadd, n) else Iintop_imm(Isub, -n)),
[arg])
(* Shift-add *)