let expr_cond_cmp_arith mem cmpop ct1 e1 ct2 e2 =
let ctr = Ctypes.promote ct1 ct2 in
begin
match ctr , ct1 , ct2 with
| C_int ir , C_int i1 , C_int i2 ->
let t1 = expr_int mem i1 ir e1 in
let t2 = expr_int mem i2 ir e2 in
icmp_operator ir cmpop t1 t2
| C_float fr, C_float f1, C_float f2 ->
let t1 = expr_float mem f1 fr e1 in
let t2 = expr_float mem f2 fr e2 in
fcmp_operator fr cmpop t1 t2
| _ -> WpLog.fatal "[expr_cond_cmp_arith] non arithmetics comparison"
end