libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / tail-merge-1.c
blobe5670c33ba36cbb872a36e8211a642d4087b623a
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-dce4" } */
4 void foo1 (int *restrict a, int *restrict b, int *restrict c,
5 int *restrict d, int *restrict res, int n)
7 for (int i = 0; i < n; i++)
8 res[i] = a[i] ? b[i] : (c[i] ? b[i] : d[i]);
11 /* After tail-merging (run during PRE) we should end up merging the two
12 blocks dereferencing 'b', ending up with two iftmp assigns and the
13 iftmp PHI def. */
14 /* { dg-final { scan-tree-dump-times "iftmp\[^\r\n\]* = " 3 "dce4" } } */