PageRenderTime 39ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/mingw-w64-v2.0.999/gcc/src/gcc/testsuite/gcc.dg/tree-ssa/slsr-3.c

#
C | 22 lines | 13 code | 2 blank | 7 comment | 0 complexity | 11fc88831522c08757ed62bc88e9d1d4 MD5 | raw file
Possible License(s): LGPL-2.1, AGPL-1.0, LGPL-3.0, Unlicense, GPL-2.0, LGPL-2.0, BSD-3-Clause, GPL-3.0
  1. /* { dg-do compile } */
  2. /* { dg-options "-O3 -fdump-tree-optimized" } */
  3. int
  4. foo (int a[], int b[], int i)
  5. {
  6. a[i] = b[i] + 2;
  7. i++;
  8. a[i] = b[i] + 2;
  9. i++;
  10. a[i] = b[i] + 2;
  11. i++;
  12. a[i] = b[i] + 2;
  13. i++;
  14. return i;
  15. }
  16. /* { dg-final { scan-tree-dump-times "\\* 4" 1 "optimized" } } */
  17. /* { dg-final { scan-tree-dump-times "\\+ 4" 2 "optimized" } } */
  18. /* { dg-final { scan-tree-dump-times "\\+ 8" 1 "optimized" } } */
  19. /* { dg-final { scan-tree-dump-times "\\+ 12" 1 "optimized" } } */
  20. /* { dg-final { cleanup-tree-dump "optimized" } } */