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