Rebase.
[official-gcc.git] / gcc / testsuite / gcc.target / mips / r10k-cache-barrier-7.c
blob3a7a2538eecf624bd769705540fac6342c3af828
1 /* { dg-options "-mr10k-cache-barrier=store -mno-abicalls" } */
3 void bar1 (void);
4 void bar2 (void);
5 void bar3 (void);
7 NOMIPS16 void
8 foo (int *x, int sel, int n)
10 if (sel)
12 bar1 ();
13 x[0] = 1;
15 else
17 bar2 ();
18 x[1] = 0;
20 /* If there is one copy of this code, reached by two unconditional edges,
21 then it shouldn't need a third cache barrier. */
22 x[2] = 2;
23 while (n--)
24 bar3 ();
27 /* { dg-final { scan-assembler-times "\tcache\t" 2 } } */