Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/polly/lib/External/isl/isl_multi_cmp.c
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * Copyright 2016      Sven Verdoolaege
3
 *
4
 * Use of this software is governed by the MIT license
5
 *
6
 * Written by Sven Verdoolaege
7
 */
8
9
#include <isl_multi_macro.h>
10
11
/* Compare two multi expressions.
12
 *
13
 * Return -1 if "multi1" is "smaller" than "multi2", 1 if "multi1" is "greater"
14
 * than "multi2" and 0 if they are equal.
15
 */
16
int FN(MULTI(BASE),plain_cmp)(__isl_keep MULTI(BASE) *multi1,
17
  __isl_keep MULTI(BASE) *multi2)
18
9.52k
{
19
9.52k
  int i;
20
9.52k
  int cmp;
21
9.52k
22
9.52k
  if (multi1 == multi2)
23
0
    return 0;
24
9.52k
  if (!multi1)
25
0
    return -1;
26
9.52k
  if (!multi2)
27
0
    return 1;
28
9.52k
29
9.52k
  cmp = isl_space_cmp(multi1->space, multi2->space);
30
9.52k
  if (cmp != 0)
31
0
    return cmp;
32
9.52k
33
17.4k
  
for (i = 0; 9.52k
i < multi1->n;
++i7.97k
) {
34
16.9k
    cmp = FN(EL,plain_cmp)(multi1->u.p[i], multi2->u.p[i]);
35
16.9k
    if (cmp != 0)
36
8.94k
      return cmp;
37
16.9k
  }
38
9.52k
39
9.52k
  
return 0580
;
40
9.52k
}