aboutsummaryrefslogtreecommitdiffstats
path: root/test/cminor/almabench.cmp
diff options
context:
space:
mode:
authorxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2012-10-06 15:46:47 +0000
committerxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2012-10-06 15:46:47 +0000
commitf7693b3d897b90fd3bc2533be002dc0bdcd9f6c2 (patch)
tree93ea9491693324d2d690c4236a2c88c3b461e225 /test/cminor/almabench.cmp
parent261ef24f7fd2ef443f73c468b9b1fa496371f3bf (diff)
downloadcompcert-f7693b3d897b90fd3bc2533be002dc0bdcd9f6c2.tar.gz
compcert-f7693b3d897b90fd3bc2533be002dc0bdcd9f6c2.zip
Merge of branch seq-and-or. See Changelog for details.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2059 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'test/cminor/almabench.cmp')
-rw-r--r--test/cminor/almabench.cmp12
1 files changed, 7 insertions, 5 deletions
diff --git a/test/cminor/almabench.cmp b/test/cminor/almabench.cmp
index bafcb5d9..caedf8b0 100644
--- a/test/cminor/almabench.cmp
+++ b/test/cminor/almabench.cmp
@@ -46,10 +46,12 @@ extern "fmod": float -> float -> float
"anpm"(a): float -> float
{
- var w;
+ var w, t;
w = fmod(a,TWOPI);
- if (absf(w) >=f PI)
- w = w -f ((a <f 0.0) ? -f TWOPI : TWOPI);
+ if (absf(w) >=f PI) {
+ if (a <f 0.0) { t = -f TWOPI; } else { t = TWOPI; }
+ w = w -f t;
+ }
return w;
}
@@ -109,8 +111,8 @@ extern "fmod": float -> float -> float
ae = ae +f dae;
k = k + 1;
- if ((k >= 10) || (absf(dae) <f 1e-12))
- exit;
+ if (k >= 10) exit;
+ if (absf(dae) <f 1e-12) exit;
} }}
ae2 = ae /f 2.0;