1  /* { dg-do run } */
       2  /* { dg-require-effective-target arm_mve_hw } */
       3  /* { dg-options "-O2" } */
       4  /* { dg-add-options arm_v8_1m_mve } */
       5  
       6  #include "arm_mve.h"
       7  #include "stdio.h"
       8  #include <stdlib.h>
       9  
      10  void
      11  foo (int64_t acc, int shift)
      12  {
      13    acc = sqrshrl_sat48 (acc, shift);
      14    if (acc != 16)
      15      abort();
      16    acc = sqrshrl (acc, shift);
      17    if (acc != 2)
      18      abort();
      19  }
      20  
      21  void
      22  foo1 (uint64_t acc, int shift)
      23  {
      24    acc = uqrshll_sat48 (acc, shift);
      25    if (acc != 16)
      26      abort();
      27    acc = uqrshll (acc, shift);
      28    if (acc != 128)
      29      abort();
      30  }
      31  
      32  int main()
      33  {
      34    int64_t acc = 128;
      35    uint64_t acc1 = 2;
      36    int shift = 3;
      37    foo (acc, shift);
      38    foo1 (acc1, shift);
      39    return 0;
      40  }