expressions: make assign_expression() take an op argument
[smatch.git] / validation / kill-replaced-insn.c
blob920218778bfcb19f18377f95d6c33442b9d5ee19
1 // See if the replaced operation is effectively killed or not
3 static int kill_add(int a, int b)
5 return (a + b) && 0;
8 static int kill_scast(short a)
10 return ((int) a) && 0;
13 static int kill_ucast(unsigned char a)
15 return ((int) a) && 0;
18 static int kill_pcast(int *a)
20 return ((void*) a) && 0;
23 static int kill_fcast(double a)
25 return ((int) a) && 0;
28 static int kill_select(int a)
30 return (a ? 1 : 0) && 0;
33 static int kill_setval(int a)
36 return &&l && 0;
39 static int kill_load(int *a)
41 return *a && 0;
44 static int kill_store(int *a)
46 return (*a = 1) && 0;
50 * check-name: kill-replaced-insn
51 * check-command: test-linearize $file
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\\.