summaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2012-08-06 14:47:25 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2012-08-06 14:47:25 +0000
commit538f7ad4feabf9eafe00788ef3a2b65a379d3ee1 (patch)
treefa1f727c664f915a89a21a75bf62b467939f1d6b /backend
parentf91e562a66ebbcac7fab5871ab6189e79653757c (diff)
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
Diffstat (limited to 'backend')
-rw-r--r--backend/Selectionproof.v22
1 files changed, 6 insertions, 16 deletions
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.