diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2013-09-14 16:24:30 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2013-09-14 16:24:30 +0000 |
commit | 76ea1108be6f8b4ba9dc0118a13f685bcb62bc2b (patch) | |
tree | 8b2dad961e6b368426573e8a217594b9bcb42752 /ia32/SelectOpproof.v | |
parent | 9a0ff6bb768cb0a6e45c1c75727d1cd8199cb89e (diff) | |
download | compcert-76ea1108be6f8b4ba9dc0118a13f685bcb62bc2b.tar.gz compcert-76ea1108be6f8b4ba9dc0118a13f685bcb62bc2b.zip |
Floats.v, Nan.v: hard-wire the general shape of binop_pl, so that no axioms
are necessary, only two parameters (default_pl and choose_binop_pl).
SelectDiv: optimize FP division by a power of 2.
ConstpropOp: optimize 2.0 * x and x * 2.0 into x + x.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2326 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'ia32/SelectOpproof.v')
-rw-r--r-- | ia32/SelectOpproof.v | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ia32/SelectOpproof.v b/ia32/SelectOpproof.v index 85802b60..cec3b599 100644 --- a/ia32/SelectOpproof.v +++ b/ia32/SelectOpproof.v @@ -576,7 +576,14 @@ Qed. Theorem eval_divf: binary_constructor_sound divf Val.divf. Proof. - red; intros; TrivialExists. + red. intros until y. unfold divf. destruct (divf_match b); intros. +- unfold divfimm. destruct (Float.exact_inverse n2) as [n2' | ] eqn:EINV. + + inv H0. inv H4. simpl in H6. inv H6. econstructor; split. + EvalOp. constructor. eauto. constructor. EvalOp. simpl; eauto. constructor. + simpl; eauto. + destruct x; simpl; auto. erewrite Float.div_mul_inverse; eauto. + + TrivialExists. +- TrivialExists. Qed. Section COMP_IMM. |