xref: /illumos-gate/usr/src/tools/smatch/src/validation/mem2reg/if-direct.c (revision f37b3cbb6f67aaea5eec1c335bdc7bf432867d64)
1 int foo(int c, int a, int b)
2 {
3 	int l;
4 
5 	if (c)
6 		l = a;
7 	else
8 		l = b;
9 
10 	return l;
11 }
12 
13 /*
14  * check-name: if-then-else direct
15  * check-command: test-linearize -Wno-decl -fdump-ir=mem2reg $file
16  * check-output-ignore
17  * check-output-excludes: load\\.
18  * check-output-contains: phi\\.
19  */
20