1 /* This is a case extracted from CSiBE which contained the following
7 where the 'tst r0,r0' before the branch can be omitted by inverting the
8 branch condition. The tested function contains two other tst insns. If
9 everything goes as expected we will be seeing only those other two tst
11 /* { dg-do compile } */
12 /* { dg-options "-O2" } */
13 /* { dg-final { scan-assembler-times "tst" 2 } } */
15 void printk (const char*, const char*, int);
16 void __constant_set_bit (int, unsigned long int*);
17 void __set_bit (int, unsigned long int*);
20 __test_bit (unsigned long nr
, volatile void * addr
)
22 /* This is on purpose. */
28 __constant_test_bit (unsigned long nr
, volatile void * addr
)
30 return (((volatile char *) addr
)[(nr
>>3)^7] & (1<<(nr
&7))) != 0;
35 struct list_head
*next
, *prev
;
38 void list_add (struct list_head
*, struct list_head
*);
41 __list_del (struct list_head
*prev
, struct list_head
*next
)
48 list_del (struct list_head
*entry
)
50 __list_del(entry
->prev
, entry
->next
);
55 extern int nr_active_pages
;
56 extern int nr_inactive_pages
;
57 extern struct list_head active_list
;
66 activate_page_nolock (struct page
* page
)
68 if ((__builtin_constant_p((6))
69 ? __constant_test_bit((6),(&(page
)->flags
))
70 : __test_bit((6),(&(page
)->flags
)) )
71 && !(__builtin_constant_p((7))
72 ? __constant_test_bit((7),(&(page
)->flags
))
73 : __test_bit((7),(&(page
)->flags
)) ))
75 list_del(&(page
)->lru
);
77 if (!(__builtin_constant_p(6) ? __constant_test_bit((6),(&(page
)->flags
))
78 : __test_bit((6),(&(page
)->flags
))))
81 if ((__builtin_constant_p(7) ? __constant_test_bit((7),(&(page
)->flags
))
82 : __test_bit((7),(&(page
)->flags
))))
85 (__builtin_constant_p(7) ? __constant_set_bit((7),(&(page
)->flags
))
86 : __set_bit((7),(&(page
)->flags
)) );
87 list_add(&(page
)->lru
, &active_list
);