(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
aarch64/
vec_init_1.c
       1  /* { dg-do run } */
       2  /* { dg-options "-O2 -fomit-frame-pointer --save-temps -fno-inline" } */
       3  
       4  extern void abort (void);
       5  
       6  typedef float float16x4_t __attribute__ ((vector_size ((16))));
       7  
       8  float a;
       9  float b;
      10  
      11  float16x4_t
      12  make_vector ()
      13  {
      14    return (float16x4_t) { 0, 0, a, b };
      15  }
      16  
      17  int
      18  main (int argc, char **argv)
      19  {
      20    a = 4.0;
      21    b = 3.0;
      22    float16x4_t vec = make_vector ();
      23    if (vec[0] != 0 || vec[1] != 0 || vec[2] != a || vec[3] != b)
      24      abort ();
      25    return 0;
      26  }
      27  
      28  /* For memory models that don't have an addend on the lane value
      29     load we can merge the load and lane insert into an LD1.
      30     For others we expect LDR + INS sequences.  */
      31  /* { dg-final { scan-assembler-times "ld1\\t" 2 { target { aarch64_tiny || aarch64_large } } } } */
      32  /* { dg-final { scan-assembler-times "ins\\t" 2 { target aarch64_small } } } */
      33  /* What we want to check, is that make_vector does not stp the whole vector
      34     to the stack.  Unfortunately here we scan the body of main() too, which may
      35     be a bit fragile - the test is currently passing only because of the option
      36     -fomit-frame-pointer which avoids use of stp in the prologue to main().  */
      37  /* { dg-final { scan-assembler-not "stp\\t" } } */