arm: fix typo in dg-require-effective-target [PR118089]
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr103660-4.c
blob26c956fdceca36a18123325befe32e131bf2c41b
1 /* PR tree-optimization/103660 */
2 /* { dg-do compile } */
3 /* { dg-options "-O1 -fgimple -fdump-tree-forwprop1-raw" } */
5 #define funcs(OP,n) \
6 __GIMPLE() \
7 int min_##n(int a, int b) { \
8 _Bool X; \
9 int t; \
10 int t1; \
11 int t2; \
12 X = a < b; \
13 t1 = X ? a : 0; \
14 t2 = X ? 0 : b; \
15 t = t1 OP t2; \
16 return t; \
17 } \
18 __GIMPLE() \
19 int f_##n(int a, int b, int c, \
20 int d) { \
21 _Bool X; \
22 int t; \
23 int t1; \
24 int t2; \
25 X = a < b; \
26 t1 = X ? c : 0; \
27 t2 = X ? 0 : d; \
28 t = t1 OP t2; \
29 return t; \
32 funcs(|, ior)
33 funcs(^, xor)
34 funcs(+, plus)
36 /* min_i/min_ioror/min_plus should produce min<a,b> */
37 /* f_xor/f_ior/f_plus should produce (a < b) ? c : d */
38 /* { dg-final { scan-tree-dump-not "bit_xor_expr, " "forwprop1" } } */
39 /* { dg-final { scan-tree-dump-not "bit_ior_expr, " "forwprop1" } } */
40 /* { dg-final { scan-tree-dump-not "plus_expr, " "forwprop1" } } */
41 /* { dg-final { scan-tree-dump-times "min_expr, " 3 "forwprop1" } } */
42 /* { dg-final { scan-tree-dump-times "lt_expr, " 3 "forwprop1" } } */
43 /* { dg-final { scan-tree-dump-times "cond_expr, " 3 "forwprop1" } } */