1// See if the replaced operation is effectively killed or not
2
3static int kill_add(int a, int b)
4{
5	return (a + b) && 0;
6}
7
8static int kill_scast(short a)
9{
10	return ((int) a) && 0;
11}
12
13static int kill_ucast(unsigned char a)
14{
15	return ((int) a) && 0;
16}
17
18static int kill_pcast(int *a)
19{
20	return ((void*) a) && 0;
21}
22
23static int kill_fcast(double a)
24{
25	return ((int) a) && 0;
26}
27
28static int kill_select(int a)
29{
30	return (a ? 1 : 0) && 0;
31}
32
33static int kill_setval(int a)
34{
35l:
36	return &&l && 0;
37}
38
39static int kill_load(int *a)
40{
41	return *a && 0;
42}
43
44static int kill_store(int *a)
45{
46	return (*a = 1) && 0;
47}
48
49/*
50 * check-name: kill-replaced-insn
51 * check-command: test-linearize $file
52 *
53 * check-output-ignore
54 * check-output-excludes: add\\.
55 * check-output-excludes: scast\\.
56 * check-output-excludes: \\<cast\\.
57 * check-output-excludes: ptrcast\\.
58 * check-output-excludes: fpcast\\.
59 * check-output-excludes: sel\\.
60 * check-output-excludes: set\\.
61 */
62