PR tree-optimization/81303
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-hoist-1.c
blobdec64165eb1436dfe3fd2f8f52b9e22b3cfcec36
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-pre" } */
4 unsigned short f(unsigned short a)
6 if (a & 0x8000)
7 a <<= 1, a = a ^ 0x1021;
8 else
9 a <<= 1;
11 return a;
14 /* We should hoist and CSE the shift. */
16 /* { dg-final { scan-tree-dump-times " << 1;" 1 "pre" } } */