[sledge] Make type arg of Exp.conditional non-optional

Reviewed By: jvillard

Differential Revision: D27262514

fbshipit-source-id: bcd35096f
master
Josh Berdine 4 years ago committed by Facebook GitHub Bot
parent eb4a01ce8d
commit 018c738499

@ -660,7 +660,7 @@ and xlate_opcode : x -> Llvm.llvalue -> Llvm.Opcode.t -> Inst.t list * Exp.t
let pre_0, cnd = xlate_rand 0 in
let pre_1, thn = xlate_rand 1 in
let pre_2, els = xlate_rand 2 in
(pre_0 @ pre_1 @ pre_2, Exp.conditional ~typ ~cnd ~thn ~els)
(pre_0 @ pre_1 @ pre_2, Exp.conditional typ ~cnd ~thn ~els)
| ExtractElement | InsertElement -> (
let typ =
let lltyp = Llvm.type_of (Llvm.operand llv 0) in

@ -431,8 +431,7 @@ let ashr = binary Ashr
(* if-then-else *)
let conditional ?typ ~cnd ~thn ~els =
let typ = match typ with Some typ -> typ | None -> typ_of thn in
let conditional typ ~cnd ~thn ~els =
Ap3 (Conditional, typ, cnd, thn, els) |> check invariant
(* sequences *)

@ -223,7 +223,7 @@ val lshr : ?typ:Typ.t -> t -> t -> t
val ashr : ?typ:Typ.t -> t -> t -> t
(* if-then-else *)
val conditional : ?typ:Typ.t -> cnd:t -> thn:t -> els:t -> t
val conditional : Typ.t -> cnd:t -> thn:t -> els:t -> t
(* sequences *)
val splat : Typ.t -> t -> t

Loading…
Cancel
Save