Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Side by Side Diff: crosstest/simple_loop_main.c

Issue 265703002: Add Om1 lowering with no optimizations (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Merge changed from Karl's committed CL Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « crosstest/simple_loop.c ('k') | crosstest/test_arith.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /* crosstest.py --test=simple_loop.c --driver=simple_loop_main.c \
2 --prefix=Subzero_ --output=simple_loop */
3
4 #include <stdio.h>
5
6 int simple_loop(int *a, int n);
7 int Subzero_simple_loop(int *a, int n);
8
9 int main(int argc, char **argv) {
10 unsigned TotalTests = 0;
11 unsigned Passes = 0;
12 unsigned Failures = 0;
13 int a[100];
14 for (int i = 0; i < 100; ++i)
15 a[i] = i * 2 - 100;
16 for (int i = -2; i < 100; ++i) {
17 ++TotalTests;
18 int llc_result = simple_loop(a, i);
19 int sz_result = Subzero_simple_loop(a, i);
20 if (llc_result == sz_result) {
21 ++Passes;
22 } else {
23 ++Failures;
24 printf("Failure: i=%d, llc=%d, sz=%d\n", i, llc_result, sz_result);
25 }
26 }
27 printf("TotalTests=%u Passes=%u Failures=%u\n", TotalTests, Passes, Failures);
28 return Failures;
29 }
OLDNEW
« no previous file with comments | « crosstest/simple_loop.c ('k') | crosstest/test_arith.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698