Home | History | Annotate | Download | only in CodeGen
      1 // REQUIRES: aarch64-registered-target
      2 // RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \
      3 // RUN:   -ffp-contract=fast -S -O3 -o - %s | FileCheck %s
      4 
      5 // Test new aarch64 intrinsics and types
      6 
      7 #include <arm_neon.h>
      8 
      9 int8x8_t test_vtbl1_s8(int8x8_t a, int8x8_t b) {
     10   // CHECK-LABEL: test_vtbl1_s8
     11   return vtbl1_s8(a, b);
     12   // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
     13 }
     14 
     15 int8x8_t test_vqtbl1_s8(int8x16_t a, int8x8_t b) {
     16   // CHECK-LABEL: test_vqtbl1_s8
     17   return vqtbl1_s8(a, b);
     18   // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
     19 }
     20 
     21 int8x8_t test_vtbl2_s8(int8x8x2_t a, int8x8_t b) {
     22   // CHECK-LABEL: test_vtbl2_s8
     23   return vtbl2_s8(a, b);
     24   // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
     25 }
     26 
     27 int8x8_t test_vqtbl2_s8(int8x16x2_t a, int8x8_t b) {
     28   // CHECK-LABEL: test_vqtbl2_s8
     29   return vqtbl2_s8(a, b);
     30   // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
     31 }
     32 
     33 int8x8_t test_vtbl3_s8(int8x8x3_t a, int8x8_t b) {
     34   // CHECK-LABEL: test_vtbl3_s8
     35   return vtbl3_s8(a, b);
     36   // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
     37 }
     38 
     39 int8x8_t test_vqtbl3_s8(int8x16x3_t a, int8x8_t b) {
     40   // CHECK-LABEL: test_vqtbl3_s8
     41   return vqtbl3_s8(a, b);
     42   // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
     43 }
     44 
     45 int8x8_t test_vtbl4_s8(int8x8x4_t a, int8x8_t b) {
     46   // CHECK-LABEL: test_vtbl4_s8
     47   return vtbl4_s8(a, b);
     48   // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
     49 }
     50 
     51 int8x8_t test_vqtbl4_s8(int8x16x4_t a, int8x8_t b) {
     52   // CHECK-LABEL: test_vqtbl4_s8
     53   return vqtbl4_s8(a, b);
     54   // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
     55 }
     56 
     57 int8x16_t test_vqtbl1q_s8(int8x16_t a, int8x16_t b) {
     58   // CHECK-LABEL: test_vqtbl1q_s8
     59   return vqtbl1q_s8(a, b);
     60   // CHECK: tbl {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
     61 }
     62 
     63 int8x16_t test_vqtbl2q_s8(int8x16x2_t a, int8x16_t b) {
     64   // CHECK-LABEL: test_vqtbl2q_s8
     65   return vqtbl2q_s8(a, b);
     66   // CHECK: tbl {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
     67 }
     68 
     69 int8x16_t test_vqtbl3q_s8(int8x16x3_t a, int8x16_t b) {
     70   // CHECK-LABEL: test_vqtbl3q_s8
     71   return vqtbl3q_s8(a, b);
     72   // CHECK: tbl {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
     73 }
     74 
     75 int8x16_t test_vqtbl4q_s8(int8x16x4_t a, int8x16_t b) {
     76   // CHECK-LABEL: test_vqtbl4q_s8
     77   return vqtbl4q_s8(a, b);
     78   // CHECK: tbl {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
     79 }
     80 
     81 int8x8_t test_vtbx1_s8(int8x8_t a, int8x8_t b, int8x8_t c) {
     82   // CHECK-LABEL: test_vtbx1_s8
     83   return vtbx1_s8(a, b, c);
     84   // CHECK: movi {{v[0-9]+.8b|d[0-9]+}}, #0
     85   // CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
     86   // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
     87   // CHECK: cmhs {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
     88   // CHECK: bsl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
     89 }
     90 
     91 int8x8_t test_vtbx2_s8(int8x8_t a, int8x8x2_t b, int8x8_t c) {
     92   // CHECK-LABEL: test_vtbx2_s8
     93   return vtbx2_s8(a, b, c);
     94   // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
     95 }
     96 
     97 int8x8_t test_vtbx3_s8(int8x8_t a, int8x8x3_t b, int8x8_t c) {
     98   // CHECK-LABEL: test_vtbx3_s8
     99   return vtbx3_s8(a, b, c);
    100   // CHECK: movi {{v[0-9]+.8b|d[0-9]+}}, #0
    101   // CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
    102   // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    103   // CHECK: cmhs {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
    104   // CHECK: bsl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
    105 }
    106 
    107 int8x8_t test_vtbx4_s8(int8x8_t a, int8x8x4_t b, int8x8_t c) {
    108   // CHECK-LABEL: test_vtbx4_s8
    109   return vtbx4_s8(a, b, c);
    110   // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    111 }
    112 
    113 int8x8_t test_vqtbx1_s8(int8x8_t a, int8x16_t b, int8x8_t c) {
    114   // CHECK-LABEL: test_vqtbx1_s8
    115   return vqtbx1_s8(a, b, c);
    116   // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    117 }
    118 
    119 int8x8_t test_vqtbx2_s8(int8x8_t a, int8x16x2_t b, int8x8_t c) {
    120   // CHECK-LABEL: test_vqtbx2_s8
    121   return vqtbx2_s8(a, b, c);
    122   // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    123 }
    124 
    125 int8x8_t test_vqtbx3_s8(int8x8_t a, int8x16x3_t b, int8x8_t c) {
    126   // CHECK-LABEL: test_vqtbx3_s8
    127   return vqtbx3_s8(a, b, c);
    128   // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    129 }
    130 
    131 int8x8_t test_vqtbx4_s8(int8x8_t a, int8x16x4_t b, int8x8_t c) {
    132   // CHECK-LABEL: test_vqtbx4_s8
    133   return vqtbx4_s8(a, b, c);
    134   // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    135 }
    136 
    137 int8x16_t test_vqtbx1q_s8(int8x16_t a, int8x16_t b, int8x16_t c) {
    138   // CHECK-LABEL: test_vqtbx1q_s8
    139   return vqtbx1q_s8(a, b, c);
    140   // CHECK: tbx {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
    141 }
    142 
    143 int8x16_t test_vqtbx2q_s8(int8x16_t a, int8x16x2_t b, int8x16_t c) {
    144   // CHECK-LABEL: test_vqtbx2q_s8
    145   return vqtbx2q_s8(a, b, c);
    146   // CHECK: tbx {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
    147 }
    148 
    149 int8x16_t test_vqtbx3q_s8(int8x16_t a, int8x16x3_t b, int8x16_t c) {
    150   // CHECK-LABEL: test_vqtbx3q_s8
    151   return vqtbx3q_s8(a, b, c);
    152   // CHECK: tbx {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
    153 }
    154 
    155 int8x16_t test_vqtbx4q_s8(int8x16_t a, int8x16x4_t b, int8x16_t c) {
    156   // CHECK-LABEL: test_vqtbx4q_s8
    157   return vqtbx4q_s8(a, b, c);
    158   // CHECK: tbx {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
    159 }
    160 
    161 uint8x8_t test_vtbl1_u8(uint8x8_t a, uint8x8_t b) {
    162   // CHECK-LABEL: test_vtbl1_u8
    163   return vtbl1_u8(a, b);
    164   // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    165 }
    166 
    167 uint8x8_t test_vqtbl1_u8(uint8x16_t a, uint8x8_t b) {
    168   // CHECK-LABEL: test_vqtbl1_u8
    169   return vqtbl1_u8(a, b);
    170   // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    171 }
    172 
    173 uint8x8_t test_vtbl2_u8(uint8x8x2_t a, uint8x8_t b) {
    174   // CHECK-LABEL: test_vtbl2_u8
    175   return vtbl2_u8(a, b);
    176   // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    177 }
    178 
    179 uint8x8_t test_vqtbl2_u8(uint8x16x2_t a, uint8x8_t b) {
    180   // CHECK-LABEL: test_vqtbl2_u8
    181   return vqtbl2_u8(a, b);
    182   // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    183 }
    184 
    185 uint8x8_t test_vtbl3_u8(uint8x8x3_t a, uint8x8_t b) {
    186   // CHECK-LABEL: test_vtbl3_u8
    187   return vtbl3_u8(a, b);
    188   // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    189 }
    190 
    191 uint8x8_t test_vqtbl3_u8(uint8x16x3_t a, uint8x8_t b) {
    192   // CHECK-LABEL: test_vqtbl3_u8
    193   return vqtbl3_u8(a, b);
    194   // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    195 }
    196 
    197 uint8x8_t test_vtbl4_u8(uint8x8x4_t a, uint8x8_t b) {
    198   // CHECK-LABEL: test_vtbl4_u8
    199   return vtbl4_u8(a, b);
    200   // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    201 }
    202 
    203 uint8x8_t test_vqtbl4_u8(uint8x16x4_t a, uint8x8_t b) {
    204   // CHECK-LABEL: test_vqtbl4_u8
    205   return vqtbl4_u8(a, b);
    206   // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    207 }
    208 
    209 uint8x16_t test_vqtbl1q_u8(uint8x16_t a, uint8x16_t b) {
    210   // CHECK-LABEL: test_vqtbl1q_u8
    211   return vqtbl1q_u8(a, b);
    212   // CHECK: tbl {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
    213 }
    214 
    215 uint8x16_t test_vqtbl2q_u8(uint8x16x2_t a, uint8x16_t b) {
    216   // CHECK-LABEL: test_vqtbl2q_u8
    217   return vqtbl2q_u8(a, b);
    218   // CHECK: tbl {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
    219 }
    220 
    221 uint8x16_t test_vqtbl3q_u8(uint8x16x3_t a, uint8x16_t b) {
    222   // CHECK-LABEL: test_vqtbl3q_u8
    223   return vqtbl3q_u8(a, b);
    224   // CHECK: tbl {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
    225 }
    226 
    227 uint8x16_t test_vqtbl4q_u8(uint8x16x4_t a, uint8x16_t b) {
    228   // CHECK-LABEL: test_vqtbl4q_u8
    229   return vqtbl4q_u8(a, b);
    230   // CHECK: tbl {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
    231 }
    232 
    233 uint8x8_t test_vtbx1_u8(uint8x8_t a, uint8x8_t b, uint8x8_t c) {
    234   // CHECK-LABEL: test_vtbx1_u8
    235   return vtbx1_u8(a, b, c);
    236   // CHECK: movi {{v[0-9]+.8b|d[0-9]+}}, #0
    237   // CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
    238   // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    239   // CHECK: cmhs {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
    240   // CHECK: bsl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
    241 }
    242 
    243 uint8x8_t test_vtbx2_u8(uint8x8_t a, uint8x8x2_t b, uint8x8_t c) {
    244   // CHECK-LABEL: test_vtbx2_u8
    245   return vtbx2_u8(a, b, c);
    246   // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    247 }
    248 
    249 uint8x8_t test_vtbx3_u8(uint8x8_t a, uint8x8x3_t b, uint8x8_t c) {
    250   // CHECK-LABEL: test_vtbx3_u8
    251   return vtbx3_u8(a, b, c);
    252   // CHECK: movi {{v[0-9]+.8b|d[0-9]+}}, #0
    253   // CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
    254   // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    255   // CHECK: cmhs {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
    256   // CHECK: bsl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
    257 }
    258 
    259 uint8x8_t test_vtbx4_u8(uint8x8_t a, uint8x8x4_t b, uint8x8_t c) {
    260   // CHECK-LABEL: test_vtbx4_u8
    261   return vtbx4_u8(a, b, c);
    262   // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    263 }
    264 
    265 uint8x8_t test_vqtbx1_u8(uint8x8_t a, uint8x16_t b, uint8x8_t c) {
    266   // CHECK-LABEL: test_vqtbx1_u8
    267   return vqtbx1_u8(a, b, c);
    268   // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    269 }
    270 
    271 uint8x8_t test_vqtbx2_u8(uint8x8_t a, uint8x16x2_t b, uint8x8_t c) {
    272   // CHECK-LABEL: test_vqtbx2_u8
    273   return vqtbx2_u8(a, b, c);
    274   // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    275 }
    276 
    277 uint8x8_t test_vqtbx3_u8(uint8x8_t a, uint8x16x3_t b, uint8x8_t c) {
    278   // CHECK-LABEL: test_vqtbx3_u8
    279   return vqtbx3_u8(a, b, c);
    280   // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    281 }
    282 
    283 uint8x8_t test_vqtbx4_u8(uint8x8_t a, uint8x16x4_t b, uint8x8_t c) {
    284   // CHECK-LABEL: test_vqtbx4_u8
    285   return vqtbx4_u8(a, b, c);
    286   // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    287 }
    288 
    289 uint8x16_t test_vqtbx1q_u8(uint8x16_t a, uint8x16_t b, uint8x16_t c) {
    290   // CHECK-LABEL: test_vqtbx1q_u8
    291   return vqtbx1q_u8(a, b, c);
    292   // CHECK: tbx {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
    293 }
    294 
    295 uint8x16_t test_vqtbx2q_u8(uint8x16_t a, uint8x16x2_t b, uint8x16_t c) {
    296   // CHECK-LABEL: test_vqtbx2q_u8
    297   return vqtbx2q_u8(a, b, c);
    298   // CHECK: tbx {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
    299 }
    300 
    301 uint8x16_t test_vqtbx3q_u8(uint8x16_t a, uint8x16x3_t b, uint8x16_t c) {
    302   // CHECK-LABEL: test_vqtbx3q_u8
    303   return vqtbx3q_u8(a, b, c);
    304   // CHECK: tbx {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
    305 }
    306 
    307 uint8x16_t test_vqtbx4q_u8(uint8x16_t a, uint8x16x4_t b, uint8x16_t c) {
    308   // CHECK-LABEL: test_vqtbx4q_u8
    309   return vqtbx4q_u8(a, b, c);
    310   // CHECK: tbx {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
    311 }
    312 
    313 poly8x8_t test_vtbl1_p8(poly8x8_t a, uint8x8_t b) {
    314   // CHECK-LABEL: test_vtbl1_p8
    315   return vtbl1_p8(a, b);
    316   // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    317 }
    318 
    319 poly8x8_t test_vqtbl1_p8(poly8x16_t a, uint8x8_t b) {
    320   // CHECK-LABEL: test_vqtbl1_p8
    321   return vqtbl1_p8(a, b);
    322   // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    323 }
    324 
    325 poly8x8_t test_vtbl2_p8(poly8x8x2_t a, uint8x8_t b) {
    326   // CHECK-LABEL: test_vtbl2_p8
    327   return vtbl2_p8(a, b);
    328   // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    329 }
    330 
    331 poly8x8_t test_vqtbl2_p8(poly8x16x2_t a, uint8x8_t b) {
    332   // CHECK-LABEL: test_vqtbl2_p8
    333   return vqtbl2_p8(a, b);
    334   // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    335 }
    336 
    337 poly8x8_t test_vtbl3_p8(poly8x8x3_t a, uint8x8_t b) {
    338   // CHECK-LABEL: test_vtbl3_p8
    339   return vtbl3_p8(a, b);
    340   // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    341 }
    342 
    343 poly8x8_t test_vqtbl3_p8(poly8x16x3_t a, uint8x8_t b) {
    344   // CHECK-LABEL: test_vqtbl3_p8
    345   return vqtbl3_p8(a, b);
    346   // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    347 }
    348 
    349 poly8x8_t test_vtbl4_p8(poly8x8x4_t a, uint8x8_t b) {
    350   // CHECK-LABEL: test_vtbl4_p8
    351   return vtbl4_p8(a, b);
    352   // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    353 }
    354 
    355 poly8x8_t test_vqtbl4_p8(poly8x16x4_t a, uint8x8_t b) {
    356   // CHECK-LABEL: test_vqtbl4_p8
    357   return vqtbl4_p8(a, b);
    358   // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    359 }
    360 
    361 poly8x16_t test_vqtbl1q_p8(poly8x16_t a, uint8x16_t b) {
    362   // CHECK-LABEL: test_vqtbl1q_p8
    363   return vqtbl1q_p8(a, b);
    364   // CHECK: tbl {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
    365 }
    366 
    367 poly8x16_t test_vqtbl2q_p8(poly8x16x2_t a, uint8x16_t b) {
    368   // CHECK-LABEL: test_vqtbl2q_p8
    369   return vqtbl2q_p8(a, b);
    370   // CHECK: tbl {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
    371 }
    372 
    373 poly8x16_t test_vqtbl3q_p8(poly8x16x3_t a, uint8x16_t b) {
    374   // CHECK-LABEL: test_vqtbl3q_p8
    375   return vqtbl3q_p8(a, b);
    376   // CHECK: tbl {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
    377 }
    378 
    379 poly8x16_t test_vqtbl4q_p8(poly8x16x4_t a, uint8x16_t b) {
    380   // CHECK-LABEL: test_vqtbl4q_p8
    381   return vqtbl4q_p8(a, b);
    382   // CHECK: tbl {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
    383 }
    384 
    385 poly8x8_t test_vtbx1_p8(poly8x8_t a, poly8x8_t b, uint8x8_t c) {
    386   // CHECK-LABEL: test_vtbx1_p8
    387   return vtbx1_p8(a, b, c);
    388   // CHECK: movi {{v[0-9]+.8b|d[0-9]+}}, #0
    389   // CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
    390   // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    391   // CHECK: cmhs {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
    392   // CHECK: bsl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
    393 }
    394 
    395 poly8x8_t test_vtbx2_p8(poly8x8_t a, poly8x8x2_t b, uint8x8_t c) {
    396   // CHECK-LABEL: test_vtbx2_p8
    397   return vtbx2_p8(a, b, c);
    398   // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    399 }
    400 
    401 poly8x8_t test_vtbx3_p8(poly8x8_t a, poly8x8x3_t b, uint8x8_t c) {
    402   // CHECK-LABEL: test_vtbx3_p8
    403   return vtbx3_p8(a, b, c);
    404   // CHECK: movi {{v[0-9]+.8b|d[0-9]+}}, #0
    405   // CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
    406   // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    407   // CHECK: cmhs {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
    408   // CHECK: bsl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
    409 }
    410 
    411 poly8x8_t test_vtbx4_p8(poly8x8_t a, poly8x8x4_t b, uint8x8_t c) {
    412   // CHECK-LABEL: test_vtbx4_p8
    413   return vtbx4_p8(a, b, c);
    414   // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    415 }
    416 
    417 poly8x8_t test_vqtbx1_p8(poly8x8_t a, uint8x16_t b, uint8x8_t c) {
    418   // CHECK-LABEL: test_vqtbx1_p8
    419   return vqtbx1_p8(a, b, c);
    420   // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    421 }
    422 
    423 poly8x8_t test_vqtbx2_p8(poly8x8_t a, poly8x16x2_t b, uint8x8_t c) {
    424   // CHECK-LABEL: test_vqtbx2_p8
    425   return vqtbx2_p8(a, b, c);
    426   // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    427 }
    428 
    429 poly8x8_t test_vqtbx3_p8(poly8x8_t a, poly8x16x3_t b, uint8x8_t c) {
    430   // CHECK-LABEL: test_vqtbx3_p8
    431   return vqtbx3_p8(a, b, c);
    432   // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    433 }
    434 
    435 poly8x8_t test_vqtbx4_p8(poly8x8_t a, poly8x16x4_t b, uint8x8_t c) {
    436   // CHECK-LABEL: test_vqtbx4_p8
    437   return vqtbx4_p8(a, b, c);
    438   // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
    439 }
    440 
    441 poly8x16_t test_vqtbx1q_p8(poly8x16_t a, uint8x16_t b, uint8x16_t c) {
    442   // CHECK-LABEL: test_vqtbx1q_p8
    443   return vqtbx1q_p8(a, b, c);
    444   // CHECK: tbx {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
    445 }
    446 
    447 poly8x16_t test_vqtbx2q_p8(poly8x16_t a, poly8x16x2_t b, uint8x16_t c) {
    448   // CHECK-LABEL: test_vqtbx2q_p8
    449   return vqtbx2q_p8(a, b, c);
    450   // CHECK: tbx {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
    451 }
    452 
    453 poly8x16_t test_vqtbx3q_p8(poly8x16_t a, poly8x16x3_t b, uint8x16_t c) {
    454   // CHECK-LABEL: test_vqtbx3q_p8
    455   return vqtbx3q_p8(a, b, c);
    456   // CHECK: tbx {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
    457 }
    458 
    459 poly8x16_t test_vqtbx4q_p8(poly8x16_t a, poly8x16x4_t b, uint8x16_t c) {
    460   // CHECK-LABEL: test_vqtbx4q_p8
    461   return vqtbx4q_p8(a, b, c);
    462   // CHECK: tbx {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
    463 }
    464