1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fdump-tree-optimized-raw" } */
3 /* PR tree-optimization/115449 */
5 void setBit_un(unsigned char *a
, int b
) {
6 unsigned char c
= 0x1UL
<< b
;
11 void setBit_sign(signed char *a
, int b
) {
12 signed char c
= 0x1UL
<< b
;
17 void setBit(char *a
, int b
) {
23 All three should produce:
29 Removing the `&~c` as we are matching `(~x & y) | x` -> `x | y`
30 match pattern even with extra casts are being involved. */
32 /* { dg-final { scan-tree-dump-not "bit_not_expr, " "optimized" } } */
33 /* { dg-final { scan-tree-dump-not "bit_and_expr, " "optimized" } } */
34 /* { dg-final { scan-tree-dump-times "bit_ior_expr, " 3 "optimized" } } */