From 551b52e3b0ddc7a06358f1246b448664a59c86b4 Mon Sep 17 00:00:00 2001 From: xleroy Date: Sun, 2 May 2010 07:39:24 +0000 Subject: 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 --- powerpc/SelectOpproof.v | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'powerpc/SelectOpproof.v') 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. -- cgit v1.2.3