summaryrefslogtreecommitdiff
path: root/powerpc/SelectOpproof.v
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2010-05-02 07:39:24 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2010-05-02 07:39:24 +0000
commit551b52e3b0ddc7a06358f1246b448664a59c86b4 (patch)
treebe9ab6596a332985c13c1477e1597412b3a1c63f /powerpc/SelectOpproof.v
parentb1b7c49cb70486cb68f9e30da7f770ae7efd932a (diff)
Optimisation: addrsymbol + (expr + cst) and addrstack + (expr + cst).
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1328 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'powerpc/SelectOpproof.v')
-rw-r--r--powerpc/SelectOpproof.v12
1 files changed, 12 insertions, 0 deletions
diff --git a/powerpc/SelectOpproof.v b/powerpc/SelectOpproof.v
index d4a45da..21614e8 100644
--- a/powerpc/SelectOpproof.v
+++ b/powerpc/SelectOpproof.v
@@ -214,6 +214,8 @@ Proof.
replace (Int.add x y) with (Int.add (Int.add x i) n2).
apply eval_addimm. EvalOp.
subst y. rewrite Int.add_assoc. auto.
+ destruct (Genv.find_symbol ge s); inv H0.
+ destruct sp; simpl in H0; inv H0.
EvalOp.
Qed.
@@ -235,6 +237,14 @@ Proof.
replace (Int.add x y) with (Int.add (Int.add x i) n2).
apply eval_addimm_ptr. EvalOp.
subst y. rewrite Int.add_assoc. auto.
+ revert H0. case_eq (Genv.find_symbol ge s); intros; inv H1.
+ EvalOp. constructor. EvalOp. simpl. rewrite H0; eauto.
+ constructor. eauto. constructor.
+ simpl. decEq. decEq. rewrite Int.add_assoc. decEq. apply Int.add_commut.
+ destruct sp; simpl in H0; inv H0.
+ EvalOp. constructor. EvalOp. simpl. eauto. constructor. eauto. constructor.
+ simpl. decEq. decEq. repeat rewrite Int.add_assoc.
+ decEq. decEq. apply Int.add_commut.
EvalOp.
Qed.
@@ -257,6 +267,8 @@ Proof.
replace (Int.add y x) with (Int.add (Int.add i x) n2).
apply eval_addimm_ptr. EvalOp. subst b0; reflexivity.
subst y. repeat rewrite Int.add_assoc. decEq. apply Int.add_commut.
+ destruct (Genv.find_symbol ge s); inv H0.
+ destruct sp; simpl in H0; inv H0.
EvalOp.
Qed.