1  /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
       2  /* { dg-require-effective-target powerpc_p9vector_ok } */
       3  /* { dg-options "-mdejagnu-cpu=power9 -O2" } */
       4  
       5  /* This file tests the extraction of 64-bit values.  On Power 9, the direct
       6     move is prefered for the  64-bit extract as it is either lower latency or
       7     the same latency as the extract instruction depending on the Endianess of
       8     the system.  Furthermore, there can be up to four move instructions in
       9     flight at a time versus only two extract intructions at a time.  */
      10  
      11  #include <altivec.h>
      12  
      13  unsigned long long
      14  extract_bool_long_long_0 (vector bool long long a)
      15  {
      16    int c = 0;
      17    unsigned long long b = vec_extract (a, c);
      18    return b;
      19  }
      20  
      21  unsigned long long int
      22  extract_long_long_0 (vector unsigned long long int a)
      23  {
      24    int c = 0;
      25    unsigned long long int b = vec_extract (a, c);
      26    return b;
      27  }
      28  
      29  /* { dg-final { scan-assembler-times "m\[ft\]vsr" 2 } } */