blob: 6f32a61e20e8b9ce0ee092e64f8fc54d65e0e44b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
int xpc_add_ypc(int x, int y)
{
return (x + 1) + (y + 1);
}
int xmc_add_ypc(int x, int y)
{
return (x - 1) + (y + 1);
}
int xpc_add_ymc(int x, int y)
{
return (x + 1) + (y - 1);
}
int xmc_add_ymc(int x, int y)
{
return (x - 1) + (y - 1);
}
int xpc_sub_ypc(int x, int y)
{
return (x + 1) - (y + 1);
}
int xmc_sub_ypc(int x, int y)
{
return (x - 1) - (y + 1);
}
int xpc_sub_ymc(int x, int y)
{
return (x + 1) - (y - 1);
}
int xmc_sub_ymc(int x, int y)
{
return (x - 1) - (y - 1);
}
/*
* check-name: canonical-add
* check-description:
* 1) verify that constants in add/sub chains are
* pushed at the right of the whole chain.
* For example '(a + 1) + b' must be canonicalized into '(a + b) + 1'
* This is needed for '(a + 1) + b - 1' to be simplified into '(a + b)'
*
* check-command: test-linearize -Wno-decl $file
* check-known-to-fail
* check-output-ignore
* check-output-excludes: \\$1
* check-output-excludes: \\$-1
*/
|