xref: /illumos-gate/usr/src/tools/smatch/src/validation/optim/bits-not-zero.c (revision 45ede40b2394db7967e59f19288fae9b62efd4aa)
1 int  or_not0(int a) { return a | ~0; }
2 int and_not0(int a) { return a & ~0; }
3 int xor_not0(int a) { return a ^ ~0; }
4 
5 /*
6  * check-name: bool-not-zero
7  * check-command: test-linearize -Wno-decl $file
8  *
9  * check-output-start
10 or_not0:
11 .L0:
12 	<entry-point>
13 	ret.32      $0xffffffff
14 
15 
16 and_not0:
17 .L2:
18 	<entry-point>
19 	ret.32      %arg1
20 
21 
22 xor_not0:
23 .L4:
24 	<entry-point>
25 	not.32      %r8 <- %arg1
26 	ret.32      %r8
27 
28 
29  * check-output-end
30  */
31