(** * Relational specification of instruction selection *)

Definition match_fundef (cunit: Cminor.program) (f: Cminor.fundef) (tf: CminorSel.fundef) : Prop :=
  exists hf, helper_functions_declared cunit hf /\ sel_fundef (prog_defmap cunit) hf f = OK tf.Definition match_prog (p: Cminor.program) (tp: CminorSel.program) :=
  match_program match_fundef eq p tp.

Lemma eval_condexpr_of_expr: forall a le v b, eval_expr tge sp e m le a v -> Val.bool_of_val v b -> eval_condexpr tge sp e m le (condexpr_of_expr a) b.