diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-04-08 17:30:48 +0200 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-04-08 17:30:48 +0200 |
commit | b58e5d1ae25b3b5b8a7d6124ff171777c298a1d2 (patch) | |
tree | 1f615cc8104525f9ef82a6f440302b8937d679df /test/monniaux/expect | |
parent | 6e64e970a706c45b5b236a0e4f92698e22682344 (diff) | |
download | compcert-kvx-b58e5d1ae25b3b5b8a7d6124ff171777c298a1d2.tar.gz compcert-kvx-b58e5d1ae25b3b5b8a7d6124ff171777c298a1d2.zip |
test file for expect
Diffstat (limited to 'test/monniaux/expect')
-rw-r--r-- | test/monniaux/expect/expect.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/monniaux/expect/expect.c b/test/monniaux/expect/expect.c new file mode 100644 index 00000000..30e0742a --- /dev/null +++ b/test/monniaux/expect/expect.c @@ -0,0 +1,7 @@ +#ifndef PREDICTED +#define PREDICTED 0 +#endif + +int expect(int x, int *y, int *z) { + return __builtin_expect(x, PREDICTED) ? *y : *z; +} |