From 538f7ad4feabf9eafe00788ef3a2b65a379d3ee1 Mon Sep 17 00:00:00 2001 From: xleroy Date: Mon, 6 Aug 2012 14:47:25 +0000 Subject: Remove Val.is_true and Val.is_false, no longer used. Simplified definition of Val.bool_of_val. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2015 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- backend/Selectionproof.v | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) (limited to 'backend') diff --git a/backend/Selectionproof.v b/backend/Selectionproof.v index 0aa2b6b..79c039f 100644 --- a/backend/Selectionproof.v +++ b/backend/Selectionproof.v @@ -103,16 +103,10 @@ Proof. intros. destruct c; simpl in H; try discriminate; destruct c; simpl in H; try discriminate; - generalize (Int.eq_spec i Int.zero); rewrite H; intro; subst i. + generalize (Int.eq_spec i Int.zero); rewrite H; intros; subst. - simpl in H0. destruct v; inv H0. - generalize (Int.eq_spec i Int.zero). destruct (Int.eq i Int.zero); intros; simpl. - subst i; constructor. constructor; auto. - - simpl in H0. destruct v; inv H0. - generalize (Int.eq_spec i Int.zero). destruct (Int.eq i Int.zero); intros; simpl. - subst i; constructor. constructor; auto. - constructor. + simpl in H0. destruct v; inv H0. constructor. + simpl in H0. destruct v; inv H0. constructor. constructor. Qed. Lemma is_compare_eq_zero_correct: @@ -139,17 +133,13 @@ Proof. destruct o; try (eapply eval_condition_of_expr_base; eauto; fail). - destruct e0. inv H0. inv H5. simpl in H7. inv H7. - inversion H1. - rewrite Int.eq_false; auto. constructor. - subst i; rewrite Int.eq_true. constructor. + destruct e0. inv H0. inv H5. simpl in H7. inv H7. inv H1. + destruct (Int.eq i Int.zero); constructor. eapply eval_condition_of_expr_base; eauto. inv H0. simpl in H7. assert (eval_condition c vl m = Some b). - destruct (eval_condition c vl m). - destruct b0; inv H7; inversion H1; congruence. - inv H7. inv H1. + inv H7. eapply Val.bool_of_val_of_optbool; eauto. assert (eval_condexpr ge sp e m le (CEcond c e0) b). eapply eval_CEcond; eauto. destruct e0; auto. destruct e1; auto. -- cgit v1.2.3