summaryrefslogtreecommitdiff
path: root/backend/Selection.v
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2012-02-24 16:43:38 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2012-02-24 16:43:38 +0000
commit62316a8e94d8cdcbf9e7aeadd1caf8e29507e6b0 (patch)
tree39b77b415e5387e8df643e18a206b7f1ffdaf329 /backend/Selection.v
parent91dcfe11ff321386f7924da053be83523073a50c (diff)
Take advantage of Cmaskzero and Cmasknotzero.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1825 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'backend/Selection.v')
-rw-r--r--backend/Selection.v5
1 files changed, 4 insertions, 1 deletions
diff --git a/backend/Selection.v b/backend/Selection.v
index 2d6c901..ef627d7 100644
--- a/backend/Selection.v
+++ b/backend/Selection.v
@@ -62,6 +62,9 @@ Definition is_compare_eq_zero (c: condition) : bool :=
| _ => false
end.
+Definition condexpr_of_expr_base (e: expr) : condexpr :=
+ let (c, args) := cond_of_expr e in CEcond c args.
+
Fixpoint condexpr_of_expr (e: expr) : condexpr :=
match e with
| Eop (Ointconst n) Enil =>
@@ -78,7 +81,7 @@ Fixpoint condexpr_of_expr (e: expr) : condexpr :=
| Econdition ce e1 e2 =>
CEcondition ce (condexpr_of_expr e1) (condexpr_of_expr e2)
| _ =>
- CEcond (Ccompuimm Cne Int.zero) (e:::Enil)
+ condexpr_of_expr_base e
end.
(** Conversion of loads and stores *)