remove mep-* support
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / forwprop-28.c
blobcc4f1f48aecc21402384ff292c68d540c1a6e842
1 /* Setting LOGICAL_OP_NON_SHORT_CIRCUIT to 0 leads to two conditional jumps
2 when evaluating an && condition. VRP is not able to optimize this. */
3 /* { dg-do compile { target { ! { logical_op_short_circuit || { m68k*-*-* mmix*-*-* bfin*-*-* v850*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* hppa*-*-* } } } } } */
4 /* { dg-options "-O2 -fdump-tree-forwprop1-details" } */
6 extern char *frob (void);
7 extern _Bool testit (void);
8 extern void oof (void);
10 void
11 test (int code)
13 char *temp = frob ();
14 int rotate = (code == 22);
15 if (temp == 0 && !rotate)
16 oof ();
19 void
20 test_2 (int code)
22 char *temp = frob ();
23 int rotate = (code == 22);
24 if (!rotate && temp == 0)
25 oof ();
28 void
29 test_3 (int code)
31 char *temp = frob ();
32 int rotate = (code == 22);
33 if (!rotate || temp == 0)
34 oof ();
37 void
38 test_4 (int code)
40 char *temp = frob ();
41 int rotate = (code == 22);
42 if (temp == 0 || !rotate)
43 oof ();
46 void
47 test_5 (int code)
49 _Bool temp = testit ();
50 _Bool rotate = (code == 22);
51 if (temp == 0 && !rotate)
52 oof ();
55 void
56 test_6 (int code)
58 _Bool temp = testit ();
59 _Bool rotate = (code == 22);
60 if (!rotate && temp == 0)
61 oof ();
64 void
65 test_7 (int code)
67 _Bool temp = testit ();
68 _Bool rotate = (code == 22);
69 if (!rotate || temp == 0)
70 oof ();
73 void
74 test_8 (int code)
76 _Bool temp = testit ();
77 _Bool rotate = (code == 22);
78 if (temp == 0 || !rotate)
79 oof ();
82 /* ??? This used to check for 8 times transforming the combined conditional
83 to a ordered compare. But the transform does not trigger if we transform
84 the negated code == 22 compare to code != 22 first. It turns out if
85 we do that we even generate better code on x86 at least. */
87 /* { dg-final { scan-tree-dump-times "simplified to if \\\(\[^ ]* \[<>\]" 4 "forwprop1"} } */