]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-17.c
Fix profile update in tree_transform_and_unroll_loop
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-sink-17.c
1 /* PR tree-optimization/97307 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-sink-details" } */
4
5 int pure_f(int a, int b) __attribute__((pure));
6 int my_f(int a, int b)
7 {
8 int x = pure_f(a, b);
9 if (a > 0)
10 return x;
11 return a;
12 }
13
14 /* We should sink the call to pure_f to the if block. */
15 /* { dg-final { scan-tree-dump "Sinking # VUSE" "sink1" } } */