(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
arm/
mve/
intrinsics/
pr101016.c
       1  /* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */
       2  /* { dg-add-options arm_v8_1m_mve_fp } */
       3  
       4  #include "arm_mve.h"
       5  
       6  void
       7  foo (void)
       8  {
       9    mve_pred16_t p;
      10    int8x16_t a;
      11    int8_t a1[10];
      12    int16x8_t b;
      13    int16_t b1[10];
      14    int32x4_t c;
      15    int32_t c1[10];
      16    uint8x16_t ua;
      17    uint8_t ua1[10];
      18    uint16x8_t ub;
      19    uint16_t ub1[10];
      20    uint32x4_t uc;
      21    uint32_t uc1[10];
      22    float16x8_t fb;
      23    float16_t fb1[10];
      24    float32x4_t fc;
      25    float32_t fc1[10];
      26  
      27    fb = vld1q (fb1);
      28    fc = vld1q (fc1);
      29    b = vld1q (b1);
      30    c = vld1q (c1);
      31    a = vld1q (a1);
      32    ub = vld1q (ub1);
      33    uc = vld1q (uc1);
      34    ua = vld1q (ua1);
      35    fb = vld1q_z (fb1, p);
      36    fc = vld1q_z (fc1, p);
      37    b = vld1q_z (b1, p);
      38    c = vld1q_z (c1, p);
      39    a = vld1q_z (a1, p);
      40    ub = vld1q_z (ub1, p);
      41    uc = vld1q_z (uc1, p);
      42    ua = vld1q_z (ua1, p);
      43  }
      44  
      45  void
      46  foo1 (void)
      47  {
      48    mve_pred16_t p;
      49    int8x16x2_t a;
      50    int8_t a1[10];
      51    int16x8x2_t b;
      52    int16_t b1[10];
      53    int32x4x2_t c;
      54    int32_t c1[10];
      55    uint8x16x2_t ua;
      56    uint8_t ua1[10];
      57    uint16x8x2_t ub;
      58    uint16_t ub1[10];
      59    uint32x4x2_t uc;
      60    uint32_t uc1[10];
      61    float16x8x2_t fb;
      62    float16_t fb1[10];
      63    float32x4x2_t fc;
      64    float32_t fc1[10];
      65  
      66    fb = vld2q (fb1);
      67    fc = vld2q (fc1);
      68    b = vld2q (b1);
      69    c = vld2q (c1);
      70    a = vld2q (a1);
      71    ub = vld2q (ub1);
      72    uc = vld2q (uc1);
      73    ua = vld2q (ua1);
      74  }
      75  
      76  void
      77  foo2 (void)
      78  {
      79    mve_pred16_t p;
      80    int8x16x4_t a;
      81    int8_t a1[10];
      82    int16x8x4_t b;
      83    int16_t b1[10];
      84    int32x4x4_t c;
      85    int32_t c1[10];
      86    uint8x16x4_t ua;
      87    uint8_t ua1[10];
      88    uint16x8x4_t ub;
      89    uint16_t ub1[10];
      90    uint32x4x4_t uc;
      91    uint32_t uc1[10];
      92    float16x8x4_t fb;
      93    float16_t fb1[10];
      94    float32x4x4_t fc;
      95    float32_t fc1[10];
      96  
      97    fb = vld4q (fb1);
      98    fc = vld4q (fc1);
      99    b = vld4q (b1);
     100    c = vld4q (c1);
     101    a = vld4q (a1);
     102    ub = vld4q (ub1);
     103    uc = vld4q (uc1);
     104    ua = vld4q (ua1);
     105  }
     106  
     107  void
     108  foo3 (void)
     109  {
     110    mve_pred16_t p;
     111    int16x8_t a;
     112    uint16x8_t ua;
     113    int8_t a1[10];
     114    uint8_t ua1[10];
     115    uint16x8_t offset_a;
     116    int8x16_t b;
     117    uint8x16_t ub;
     118    uint8x16_t offset_b;
     119    int32x4_t c;
     120    uint32x4_t uc;
     121    uint32x4_t offset_c;
     122  
     123    a = vldrbq_gather_offset (a1, offset_a);
     124    ua = vldrbq_gather_offset (ua1, offset_a);
     125    b = vldrbq_gather_offset (a1, offset_b);
     126    ub = vldrbq_gather_offset (ua1, offset_b);
     127    c = vldrbq_gather_offset (a1, offset_c);
     128    uc = vldrbq_gather_offset (ua1, offset_c);
     129    a = vldrbq_gather_offset_z (a1, offset_a, p);
     130    ua = vldrbq_gather_offset_z (ua1, offset_a, p);
     131    b = vldrbq_gather_offset_z (a1, offset_b, p);
     132    ub = vldrbq_gather_offset_z (ua1, offset_b, p);
     133    c = vldrbq_gather_offset_z (a1, offset_c, p);
     134    uc = vldrbq_gather_offset_z (ua1, offset_c, p);
     135  }
     136  /* { dg-final { scan-assembler-not "__ARM_undef" } } */