blob: 920218778bfcb19f18377f95d6c33442b9d5ee19 (
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
56
57
58
59
60
61
|
// See if the replaced operation is effectively killed or not
static int kill_add(int a, int b)
{
return (a + b) && 0;
}
static int kill_scast(short a)
{
return ((int) a) && 0;
}
static int kill_ucast(unsigned char a)
{
return ((int) a) && 0;
}
static int kill_pcast(int *a)
{
return ((void*) a) && 0;
}
static int kill_fcast(double a)
{
return ((int) a) && 0;
}
static int kill_select(int a)
{
return (a ? 1 : 0) && 0;
}
static int kill_setval(int a)
{
l:
return &&l && 0;
}
static int kill_load(int *a)
{
return *a && 0;
}
static int kill_store(int *a)
{
return (*a = 1) && 0;
}
/*
* check-name: kill-replaced-insn
* check-command: test-linearize $file
*
* check-output-ignore
* check-output-excludes: add\\.
* check-output-excludes: scast\\.
* check-output-excludes: \\<cast\\.
* check-output-excludes: ptrcast\\.
* check-output-excludes: fpcast\\.
* check-output-excludes: sel\\.
* check-output-excludes: set\\.
*/
|