1  /* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-profile-optimized" } */
       2  int a[1000];
       3  int b[1000];
       4  int size=1;
       5  int max=10000;
       6  #ifdef __mips
       7  /* We allow short memcpy()s for MIPS16.  */
       8  int __attribute__((nomips16))
       9  #else
      10  int
      11  #endif
      12  main()
      13  {
      14    int i;
      15    for (i=0;i<max; i++)
      16      {
      17        __builtin_memset (a, 10, size * sizeof (a[0]));
      18        asm("");
      19      }
      20     return 0;
      21  }
      22  /* autofdo doesn't support value profiling for now: */
      23  /* { dg-final-use-not-autofdo { scan-ipa-dump "Transformation done: single value 4 stringop" "profile" { target { ! aarch64*-*-* } } } } */
      24  /* The versioned memset of size 4 should be optimized to an assignment.
      25     { dg-final-use-not-autofdo { scan-tree-dump "MEM <\[a-z \]+> \\\[\\(void .\\)&a\\\] = 168430090" "optimized" { target { ! aarch64*-*-* } } } } */