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