1 /* PR tree-optimization/28632 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -ftree-vrp -fno-tree-ccp" } */
4 /* { dg-require-effective-target int32plus } */
7 v4 (unsigned a, unsigned b)
9 if (a < 0x1000) return;
10 if (a > 0x1000) return;
11 if (b < 0x0110) return;
13 if (!__builtin_constant_p ((a|b) >= 0x01000))
14 __asm__("vrp.bug.always.true");
15 /* VRP must not think that this is constant. */
16 if (__builtin_constant_p ((a|b) >= 0x10000))
17 __asm__("vrp.bug.not.always.true");
23 if (n > 0x10111) return;
24 if (n < 0x10101) return;
26 if (!__builtin_constant_p (n & 0x00100))
27 __asm__("vrp.bug.always.true");
28 /* VRP must not think that this is constant true. */
29 if (__builtin_constant_p (n & 0x00001))
30 __asm__("vrp.bug.not.always.true");
31 /* Out of range, always evaluates to constant false. */
32 if (!__builtin_constant_p (n & 0x01000))
33 __asm__("vrp.bug.always.false");
39 struct s {unsigned exp:8;} x;
41 if (__builtin_constant_p(((n + 1) & 255) > 1))
42 __asm__("vrp.bug.not.always.true");
48 if (a < 0x1000) return;
49 if (a > 0x1000) return;
50 if (b < 0x0110) return;
52 if (!__builtin_constant_p ((a|b) >= 0x01000))
53 __asm__("vrp.bug.always.true");
54 /* VRP must not think that this is always true. */
55 if (__builtin_constant_p ((a|b) >= 0x10000))
56 __asm__("vrp.bug.not.always.true");
59 /* { dg-final { scan-assembler-not "vrp\\\.bug\\\." } } */