1  /* { dg-do compile { target { s390*-*-* } } } */
       2  /* { dg-options "-O3 -mzarch -march=z14 -mzvector" } */
       3  
       4  #include <vecintrin.h>
       5  
       6  typedef float __attribute__((aligned(8))) float_aligned;
       7  
       8  vector float
       9  foo (float_aligned *a)
      10  {
      11    return vec_xl (0, a);
      12  }
      13  
      14  vector float
      15  bar (const float_aligned *a)
      16  {
      17    return vec_xl (0, a);
      18  }
      19  
      20  void
      21  baz (float_aligned *f, vector float a)
      22  {
      23    vec_xst (a, 0, f);
      24  }
      25  
      26  vector float
      27  foo2 (float_aligned *a)
      28  {
      29    return vec_xlw4 (0, a);
      30  }
      31  
      32  vector float
      33  bar2 (const float_aligned *a)
      34  {
      35    return vec_xlw4 (0, a);
      36  }
      37  
      38  void
      39  baz2 (float_aligned *f, vector float a)
      40  {
      41    vec_xstw4 (a, 0, f);
      42  }
      43  
      44  /* Make sure alignment hints are generated if the source or target
      45     operand is properly aligned.  */
      46  
      47  /* { dg-final { scan-assembler-times "vl\t%v\[0-9\]*,0\\(%r2\\),3" 4 } } */
      48  /* { dg-final { scan-assembler-times "vst\t%v\[0-9\]*,0\\(%r2\\),3" 2 } } */