Home | History | Annotate | Download | only in AArch64
      1 ; RUN: llc -mtriple arm64_be < %s -aarch64-load-store-opt=false -o - | FileCheck %s
      2 ; RUN: llc -mtriple arm64_be < %s -aarch64-load-store-opt=false -fast-isel=true -O0 -o - | FileCheck %s
      3 
      4 ; CHECK-LABEL: test_i64_f64:
      5 declare i64 @test_i64_f64_helper(double %p)
      6 define void @test_i64_f64(double* %p, i64* %q) {
      7 ; CHECK-NOT: rev
      8     %1 = load double* %p
      9     %2 = fadd double %1, %1
     10     %3 = call i64 @test_i64_f64_helper(double %2)
     11     %4 = add i64 %3, %3
     12     store i64 %4, i64* %q
     13     ret void
     14 }
     15 
     16 ; CHECK-LABEL: test_i64_v1i64:
     17 declare i64 @test_i64_v1i64_helper(<1 x i64> %p)
     18 define void @test_i64_v1i64(<1 x i64>* %p, i64* %q) {
     19 ; CHECK-NOT: rev
     20     %1 = load <1 x i64>* %p
     21     %2 = add <1 x i64> %1, %1
     22     %3 = call i64 @test_i64_v1i64_helper(<1 x i64> %2)
     23     %4 = add i64 %3, %3
     24     store i64 %4, i64* %q
     25     ret void
     26 }
     27 
     28 ; CHECK-LABEL: test_i64_v2f32:
     29 declare i64 @test_i64_v2f32_helper(<2 x float> %p)
     30 define void @test_i64_v2f32(<2 x float>* %p, i64* %q) {
     31 ; CHECK: rev64 v{{[0-9]+}}.2s
     32     %1 = load <2 x float>* %p
     33     %2 = fadd <2 x float> %1, %1
     34     %3 = call i64 @test_i64_v2f32_helper(<2 x float> %2)
     35     %4 = add i64 %3, %3
     36     store i64 %4, i64* %q
     37     ret void
     38 }
     39 
     40 ; CHECK-LABEL: test_i64_v2i32:
     41 declare i64 @test_i64_v2i32_helper(<2 x i32> %p)
     42 define void @test_i64_v2i32(<2 x i32>* %p, i64* %q) {
     43 ; CHECK: rev64 v{{[0-9]+}}.2s
     44     %1 = load <2 x i32>* %p
     45     %2 = add <2 x i32> %1, %1
     46     %3 = call i64 @test_i64_v2i32_helper(<2 x i32> %2)
     47     %4 = add i64 %3, %3
     48     store i64 %4, i64* %q
     49     ret void
     50 }
     51 
     52 ; CHECK-LABEL: test_i64_v4i16:
     53 declare i64 @test_i64_v4i16_helper(<4 x i16> %p)
     54 define void @test_i64_v4i16(<4 x i16>* %p, i64* %q) {
     55 ; CHECK: rev64 v{{[0-9]+}}.4h
     56     %1 = load <4 x i16>* %p
     57     %2 = add <4 x i16> %1, %1
     58     %3 = call i64 @test_i64_v4i16_helper(<4 x i16> %2)
     59     %4 = add i64 %3, %3
     60     store i64 %4, i64* %q
     61     ret void
     62 }
     63 
     64 ; CHECK-LABEL: test_i64_v8i8:
     65 declare i64 @test_i64_v8i8_helper(<8 x i8> %p)
     66 define void @test_i64_v8i8(<8 x i8>* %p, i64* %q) {
     67 ; CHECK: rev64 v{{[0-9]+}}.8b
     68     %1 = load <8 x i8>* %p
     69     %2 = add <8 x i8> %1, %1
     70     %3 = call i64 @test_i64_v8i8_helper(<8 x i8> %2)
     71     %4 = add i64 %3, %3
     72     store i64 %4, i64* %q
     73     ret void
     74 }
     75 
     76 ; CHECK-LABEL: test_f64_i64:
     77 declare double @test_f64_i64_helper(i64 %p)
     78 define void @test_f64_i64(i64* %p, double* %q) {
     79 ; CHECK-NOT: rev
     80     %1 = load i64* %p
     81     %2 = add i64 %1, %1
     82     %3 = call double @test_f64_i64_helper(i64 %2)
     83     %4 = fadd double %3, %3
     84     store double %4, double* %q
     85     ret void
     86 }
     87 
     88 ; CHECK-LABEL: test_f64_v1i64:
     89 declare double @test_f64_v1i64_helper(<1 x i64> %p)
     90 define void @test_f64_v1i64(<1 x i64>* %p, double* %q) {
     91 ; CHECK-NOT: rev
     92     %1 = load <1 x i64>* %p
     93     %2 = add <1 x i64> %1, %1
     94     %3 = call double @test_f64_v1i64_helper(<1 x i64> %2)
     95     %4 = fadd double %3, %3
     96     store double %4, double* %q
     97     ret void
     98 }
     99 
    100 ; CHECK-LABEL: test_f64_v2f32:
    101 declare double @test_f64_v2f32_helper(<2 x float> %p)
    102 define void @test_f64_v2f32(<2 x float>* %p, double* %q) {
    103 ; CHECK: rev64 v{{[0-9]+}}.2s
    104     %1 = load <2 x float>* %p
    105     %2 = fadd <2 x float> %1, %1
    106     %3 = call double @test_f64_v2f32_helper(<2 x float> %2)
    107     %4 = fadd double %3, %3
    108     store double %4, double* %q
    109     ret void
    110 }
    111 
    112 ; CHECK-LABEL: test_f64_v2i32:
    113 declare double @test_f64_v2i32_helper(<2 x i32> %p)
    114 define void @test_f64_v2i32(<2 x i32>* %p, double* %q) {
    115 ; CHECK: rev64 v{{[0-9]+}}.2s
    116     %1 = load <2 x i32>* %p
    117     %2 = add <2 x i32> %1, %1
    118     %3 = call double @test_f64_v2i32_helper(<2 x i32> %2)
    119     %4 = fadd double %3, %3
    120     store double %4, double* %q
    121     ret void
    122 }
    123 
    124 ; CHECK-LABEL: test_f64_v4i16:
    125 declare double @test_f64_v4i16_helper(<4 x i16> %p)
    126 define void @test_f64_v4i16(<4 x i16>* %p, double* %q) {
    127 ; CHECK: rev64 v{{[0-9]+}}.4h
    128     %1 = load <4 x i16>* %p
    129     %2 = add <4 x i16> %1, %1
    130     %3 = call double @test_f64_v4i16_helper(<4 x i16> %2)
    131     %4 = fadd double %3, %3
    132     store double %4, double* %q
    133     ret void
    134 }
    135 
    136 ; CHECK-LABEL: test_f64_v8i8:
    137 declare double @test_f64_v8i8_helper(<8 x i8> %p)
    138 define void @test_f64_v8i8(<8 x i8>* %p, double* %q) {
    139 ; CHECK: rev64 v{{[0-9]+}}.8b
    140     %1 = load <8 x i8>* %p
    141     %2 = add <8 x i8> %1, %1
    142     %3 = call double @test_f64_v8i8_helper(<8 x i8> %2)
    143     %4 = fadd double %3, %3
    144     store double %4, double* %q
    145     ret void
    146 }
    147 
    148 ; CHECK-LABEL: test_v1i64_i64:
    149 declare <1 x i64> @test_v1i64_i64_helper(i64 %p)
    150 define void @test_v1i64_i64(i64* %p, <1 x i64>* %q) {
    151 ; CHECK-NOT: rev
    152     %1 = load i64* %p
    153     %2 = add i64 %1, %1
    154     %3 = call <1 x i64> @test_v1i64_i64_helper(i64 %2)
    155     %4 = add <1 x i64> %3, %3
    156     store <1 x i64> %4, <1 x i64>* %q
    157     ret void
    158 }
    159 
    160 ; CHECK-LABEL: test_v1i64_f64:
    161 declare <1 x i64> @test_v1i64_f64_helper(double %p)
    162 define void @test_v1i64_f64(double* %p, <1 x i64>* %q) {
    163 ; CHECK-NOT: rev
    164     %1 = load double* %p
    165     %2 = fadd double %1, %1
    166     %3 = call <1 x i64> @test_v1i64_f64_helper(double %2)
    167     %4 = add <1 x i64> %3, %3
    168     store <1 x i64> %4, <1 x i64>* %q
    169     ret void
    170 }
    171 
    172 ; CHECK-LABEL: test_v1i64_v2f32:
    173 declare <1 x i64> @test_v1i64_v2f32_helper(<2 x float> %p)
    174 define void @test_v1i64_v2f32(<2 x float>* %p, <1 x i64>* %q) {
    175 ; CHECK: rev64 v{{[0-9]+}}.2s
    176     %1 = load <2 x float>* %p
    177     %2 = fadd <2 x float> %1, %1
    178     %3 = call <1 x i64> @test_v1i64_v2f32_helper(<2 x float> %2)
    179     %4 = add <1 x i64> %3, %3
    180     store <1 x i64> %4, <1 x i64>* %q
    181     ret void
    182 }
    183 
    184 ; CHECK-LABEL: test_v1i64_v2i32:
    185 declare <1 x i64> @test_v1i64_v2i32_helper(<2 x i32> %p)
    186 define void @test_v1i64_v2i32(<2 x i32>* %p, <1 x i64>* %q) {
    187 ; CHECK: rev64 v{{[0-9]+}}.2s
    188     %1 = load <2 x i32>* %p
    189     %2 = add <2 x i32> %1, %1
    190     %3 = call <1 x i64> @test_v1i64_v2i32_helper(<2 x i32> %2)
    191     %4 = add <1 x i64> %3, %3
    192     store <1 x i64> %4, <1 x i64>* %q
    193     ret void
    194 }
    195 
    196 ; CHECK-LABEL: test_v1i64_v4i16:
    197 declare <1 x i64> @test_v1i64_v4i16_helper(<4 x i16> %p)
    198 define void @test_v1i64_v4i16(<4 x i16>* %p, <1 x i64>* %q) {
    199 ; CHECK: rev64 v{{[0-9]+}}.4h
    200     %1 = load <4 x i16>* %p
    201     %2 = add <4 x i16> %1, %1
    202     %3 = call <1 x i64> @test_v1i64_v4i16_helper(<4 x i16> %2)
    203     %4 = add <1 x i64> %3, %3
    204     store <1 x i64> %4, <1 x i64>* %q
    205     ret void
    206 }
    207 
    208 ; CHECK-LABEL: test_v1i64_v8i8:
    209 declare <1 x i64> @test_v1i64_v8i8_helper(<8 x i8> %p)
    210 define void @test_v1i64_v8i8(<8 x i8>* %p, <1 x i64>* %q) {
    211 ; CHECK: rev64 v{{[0-9]+}}.8b
    212     %1 = load <8 x i8>* %p
    213     %2 = add <8 x i8> %1, %1
    214     %3 = call <1 x i64> @test_v1i64_v8i8_helper(<8 x i8> %2)
    215     %4 = add <1 x i64> %3, %3
    216     store <1 x i64> %4, <1 x i64>* %q
    217     ret void
    218 }
    219 
    220 ; CHECK-LABEL: test_v2f32_i64:
    221 declare <2 x float> @test_v2f32_i64_helper(i64 %p)
    222 define void @test_v2f32_i64(i64* %p, <2 x float>* %q) {
    223 ; CHECK: rev64 v{{[0-9]+}}.2s
    224     %1 = load i64* %p
    225     %2 = add i64 %1, %1
    226     %3 = call <2 x float> @test_v2f32_i64_helper(i64 %2)
    227     %4 = fadd <2 x float> %3, %3
    228     store <2 x float> %4, <2 x float>* %q
    229     ret void
    230 }
    231 
    232 ; CHECK-LABEL: test_v2f32_f64:
    233 declare <2 x float> @test_v2f32_f64_helper(double %p)
    234 define void @test_v2f32_f64(double* %p, <2 x float>* %q) {
    235 ; CHECK: rev64 v{{[0-9]+}}.2s
    236     %1 = load double* %p
    237     %2 = fadd double %1, %1
    238     %3 = call <2 x float> @test_v2f32_f64_helper(double %2)
    239     %4 = fadd <2 x float> %3, %3
    240     store <2 x float> %4, <2 x float>* %q
    241     ret void
    242 }
    243 
    244 ; CHECK-LABEL: test_v2f32_v1i64:
    245 declare <2 x float> @test_v2f32_v1i64_helper(<1 x i64> %p)
    246 define void @test_v2f32_v1i64(<1 x i64>* %p, <2 x float>* %q) {
    247 ; CHECK: rev64 v{{[0-9]+}}.2s
    248     %1 = load <1 x i64>* %p
    249     %2 = add <1 x i64> %1, %1
    250     %3 = call <2 x float> @test_v2f32_v1i64_helper(<1 x i64> %2)
    251     %4 = fadd <2 x float> %3, %3
    252     store <2 x float> %4, <2 x float>* %q
    253     ret void
    254 }
    255 
    256 ; CHECK-LABEL: test_v2f32_v2i32:
    257 declare <2 x float> @test_v2f32_v2i32_helper(<2 x i32> %p)
    258 define void @test_v2f32_v2i32(<2 x i32>* %p, <2 x float>* %q) {
    259 ; CHECK: rev64 v{{[0-9]+}}.2s
    260 ; CHECK: rev64 v{{[0-9]+}}.2s
    261     %1 = load <2 x i32>* %p
    262     %2 = add <2 x i32> %1, %1
    263     %3 = call <2 x float> @test_v2f32_v2i32_helper(<2 x i32> %2)
    264     %4 = fadd <2 x float> %3, %3
    265     store <2 x float> %4, <2 x float>* %q
    266     ret void
    267 }
    268 
    269 ; CHECK-LABEL: test_v2f32_v4i16:
    270 declare <2 x float> @test_v2f32_v4i16_helper(<4 x i16> %p)
    271 define void @test_v2f32_v4i16(<4 x i16>* %p, <2 x float>* %q) {
    272 ; CHECK: rev64 v{{[0-9]+}}.4h
    273 ; CHECK: rev64 v{{[0-9]+}}.2s
    274     %1 = load <4 x i16>* %p
    275     %2 = add <4 x i16> %1, %1
    276     %3 = call <2 x float> @test_v2f32_v4i16_helper(<4 x i16> %2)
    277     %4 = fadd <2 x float> %3, %3
    278     store <2 x float> %4, <2 x float>* %q
    279     ret void
    280 }
    281 
    282 ; CHECK-LABEL: test_v2f32_v8i8:
    283 declare <2 x float> @test_v2f32_v8i8_helper(<8 x i8> %p)
    284 define void @test_v2f32_v8i8(<8 x i8>* %p, <2 x float>* %q) {
    285 ; CHECK: rev64 v{{[0-9]+}}.8b
    286 ; CHECK: rev64 v{{[0-9]+}}.2s
    287     %1 = load <8 x i8>* %p
    288     %2 = add <8 x i8> %1, %1
    289     %3 = call <2 x float> @test_v2f32_v8i8_helper(<8 x i8> %2)
    290     %4 = fadd <2 x float> %3, %3
    291     store <2 x float> %4, <2 x float>* %q
    292     ret void
    293 }
    294 
    295 ; CHECK-LABEL: test_v2i32_i64:
    296 declare <2 x i32> @test_v2i32_i64_helper(i64 %p)
    297 define void @test_v2i32_i64(i64* %p, <2 x i32>* %q) {
    298 ; CHECK: rev64 v{{[0-9]+}}.2s
    299     %1 = load i64* %p
    300     %2 = add i64 %1, %1
    301     %3 = call <2 x i32> @test_v2i32_i64_helper(i64 %2)
    302     %4 = add <2 x i32> %3, %3
    303     store <2 x i32> %4, <2 x i32>* %q
    304     ret void
    305 }
    306 
    307 ; CHECK-LABEL: test_v2i32_f64:
    308 declare <2 x i32> @test_v2i32_f64_helper(double %p)
    309 define void @test_v2i32_f64(double* %p, <2 x i32>* %q) {
    310 ; CHECK: rev64 v{{[0-9]+}}.2s
    311     %1 = load double* %p
    312     %2 = fadd double %1, %1
    313     %3 = call <2 x i32> @test_v2i32_f64_helper(double %2)
    314     %4 = add <2 x i32> %3, %3
    315     store <2 x i32> %4, <2 x i32>* %q
    316     ret void
    317 }
    318 
    319 ; CHECK-LABEL: test_v2i32_v1i64:
    320 declare <2 x i32> @test_v2i32_v1i64_helper(<1 x i64> %p)
    321 define void @test_v2i32_v1i64(<1 x i64>* %p, <2 x i32>* %q) {
    322 ; CHECK: rev64 v{{[0-9]+}}.2s
    323     %1 = load <1 x i64>* %p
    324     %2 = add <1 x i64> %1, %1
    325     %3 = call <2 x i32> @test_v2i32_v1i64_helper(<1 x i64> %2)
    326     %4 = add <2 x i32> %3, %3
    327     store <2 x i32> %4, <2 x i32>* %q
    328     ret void
    329 }
    330 
    331 ; CHECK-LABEL: test_v2i32_v2f32:
    332 declare <2 x i32> @test_v2i32_v2f32_helper(<2 x float> %p)
    333 define void @test_v2i32_v2f32(<2 x float>* %p, <2 x i32>* %q) {
    334 ; CHECK: rev64 v{{[0-9]+}}.2s
    335 ; CHECK: rev64 v{{[0-9]+}}.2s
    336     %1 = load <2 x float>* %p
    337     %2 = fadd <2 x float> %1, %1
    338     %3 = call <2 x i32> @test_v2i32_v2f32_helper(<2 x float> %2)
    339     %4 = add <2 x i32> %3, %3
    340     store <2 x i32> %4, <2 x i32>* %q
    341     ret void
    342 }
    343 
    344 ; CHECK-LABEL: test_v2i32_v4i16:
    345 declare <2 x i32> @test_v2i32_v4i16_helper(<4 x i16> %p)
    346 define void @test_v2i32_v4i16(<4 x i16>* %p, <2 x i32>* %q) {
    347 ; CHECK: rev64 v{{[0-9]+}}.4h
    348 ; CHECK: rev64 v{{[0-9]+}}.2s
    349     %1 = load <4 x i16>* %p
    350     %2 = add <4 x i16> %1, %1
    351     %3 = call <2 x i32> @test_v2i32_v4i16_helper(<4 x i16> %2)
    352     %4 = add <2 x i32> %3, %3
    353     store <2 x i32> %4, <2 x i32>* %q
    354     ret void
    355 }
    356 
    357 ; CHECK-LABEL: test_v2i32_v8i8:
    358 declare <2 x i32> @test_v2i32_v8i8_helper(<8 x i8> %p)
    359 define void @test_v2i32_v8i8(<8 x i8>* %p, <2 x i32>* %q) {
    360 ; CHECK: rev64 v{{[0-9]+}}.8b
    361 ; CHECK: rev64 v{{[0-9]+}}.2s
    362     %1 = load <8 x i8>* %p
    363     %2 = add <8 x i8> %1, %1
    364     %3 = call <2 x i32> @test_v2i32_v8i8_helper(<8 x i8> %2)
    365     %4 = add <2 x i32> %3, %3
    366     store <2 x i32> %4, <2 x i32>* %q
    367     ret void
    368 }
    369 
    370 ; CHECK-LABEL: test_v4i16_i64:
    371 declare <4 x i16> @test_v4i16_i64_helper(i64 %p)
    372 define void @test_v4i16_i64(i64* %p, <4 x i16>* %q) {
    373 ; CHECK: rev64 v{{[0-9]+}}.4h
    374     %1 = load i64* %p
    375     %2 = add i64 %1, %1
    376     %3 = call <4 x i16> @test_v4i16_i64_helper(i64 %2)
    377     %4 = add <4 x i16> %3, %3
    378     store <4 x i16> %4, <4 x i16>* %q
    379     ret void
    380 }
    381 
    382 ; CHECK-LABEL: test_v4i16_f64:
    383 declare <4 x i16> @test_v4i16_f64_helper(double %p)
    384 define void @test_v4i16_f64(double* %p, <4 x i16>* %q) {
    385 ; CHECK: rev64 v{{[0-9]+}}.4h
    386     %1 = load double* %p
    387     %2 = fadd double %1, %1
    388     %3 = call <4 x i16> @test_v4i16_f64_helper(double %2)
    389     %4 = add <4 x i16> %3, %3
    390     store <4 x i16> %4, <4 x i16>* %q
    391     ret void
    392 }
    393 
    394 ; CHECK-LABEL: test_v4i16_v1i64:
    395 declare <4 x i16> @test_v4i16_v1i64_helper(<1 x i64> %p)
    396 define void @test_v4i16_v1i64(<1 x i64>* %p, <4 x i16>* %q) {
    397 ; CHECK: rev64 v{{[0-9]+}}.4h
    398     %1 = load <1 x i64>* %p
    399     %2 = add <1 x i64> %1, %1
    400     %3 = call <4 x i16> @test_v4i16_v1i64_helper(<1 x i64> %2)
    401     %4 = add <4 x i16> %3, %3
    402     store <4 x i16> %4, <4 x i16>* %q
    403     ret void
    404 }
    405 
    406 ; CHECK-LABEL: test_v4i16_v2f32:
    407 declare <4 x i16> @test_v4i16_v2f32_helper(<2 x float> %p)
    408 define void @test_v4i16_v2f32(<2 x float>* %p, <4 x i16>* %q) {
    409 ; CHECK: rev64 v{{[0-9]+}}.2s
    410 ; CHECK: rev64 v{{[0-9]+}}.4h
    411     %1 = load <2 x float>* %p
    412     %2 = fadd <2 x float> %1, %1
    413     %3 = call <4 x i16> @test_v4i16_v2f32_helper(<2 x float> %2)
    414     %4 = add <4 x i16> %3, %3
    415     store <4 x i16> %4, <4 x i16>* %q
    416     ret void
    417 }
    418 
    419 ; CHECK-LABEL: test_v4i16_v2i32:
    420 declare <4 x i16> @test_v4i16_v2i32_helper(<2 x i32> %p)
    421 define void @test_v4i16_v2i32(<2 x i32>* %p, <4 x i16>* %q) {
    422 ; CHECK: rev64 v{{[0-9]+}}.2s
    423 ; CHECK: rev64 v{{[0-9]+}}.4h
    424     %1 = load <2 x i32>* %p
    425     %2 = add <2 x i32> %1, %1
    426     %3 = call <4 x i16> @test_v4i16_v2i32_helper(<2 x i32> %2)
    427     %4 = add <4 x i16> %3, %3
    428     store <4 x i16> %4, <4 x i16>* %q
    429     ret void
    430 }
    431 
    432 ; CHECK-LABEL: test_v4i16_v8i8:
    433 declare <4 x i16> @test_v4i16_v8i8_helper(<8 x i8> %p)
    434 define void @test_v4i16_v8i8(<8 x i8>* %p, <4 x i16>* %q) {
    435 ; CHECK: rev64 v{{[0-9]+}}.8b
    436 ; CHECK: rev64 v{{[0-9]+}}.4h
    437     %1 = load <8 x i8>* %p
    438     %2 = add <8 x i8> %1, %1
    439     %3 = call <4 x i16> @test_v4i16_v8i8_helper(<8 x i8> %2)
    440     %4 = add <4 x i16> %3, %3
    441     store <4 x i16> %4, <4 x i16>* %q
    442     ret void
    443 }
    444 
    445 ; CHECK-LABEL: test_v8i8_i64:
    446 declare <8 x i8> @test_v8i8_i64_helper(i64 %p)
    447 define void @test_v8i8_i64(i64* %p, <8 x i8>* %q) {
    448 ; CHECK: rev64 v{{[0-9]+}}.8b
    449     %1 = load i64* %p
    450     %2 = add i64 %1, %1
    451     %3 = call <8 x i8> @test_v8i8_i64_helper(i64 %2)
    452     %4 = add <8 x i8> %3, %3
    453     store <8 x i8> %4, <8 x i8>* %q
    454     ret void
    455 }
    456 
    457 ; CHECK-LABEL: test_v8i8_f64:
    458 declare <8 x i8> @test_v8i8_f64_helper(double %p)
    459 define void @test_v8i8_f64(double* %p, <8 x i8>* %q) {
    460 ; CHECK: rev64 v{{[0-9]+}}.8b
    461     %1 = load double* %p
    462     %2 = fadd double %1, %1
    463     %3 = call <8 x i8> @test_v8i8_f64_helper(double %2)
    464     %4 = add <8 x i8> %3, %3
    465     store <8 x i8> %4, <8 x i8>* %q
    466     ret void
    467 }
    468 
    469 ; CHECK-LABEL: test_v8i8_v1i64:
    470 declare <8 x i8> @test_v8i8_v1i64_helper(<1 x i64> %p)
    471 define void @test_v8i8_v1i64(<1 x i64>* %p, <8 x i8>* %q) {
    472 ; CHECK: rev64 v{{[0-9]+}}.8b
    473     %1 = load <1 x i64>* %p
    474     %2 = add <1 x i64> %1, %1
    475     %3 = call <8 x i8> @test_v8i8_v1i64_helper(<1 x i64> %2)
    476     %4 = add <8 x i8> %3, %3
    477     store <8 x i8> %4, <8 x i8>* %q
    478     ret void
    479 }
    480 
    481 ; CHECK-LABEL: test_v8i8_v2f32:
    482 declare <8 x i8> @test_v8i8_v2f32_helper(<2 x float> %p)
    483 define void @test_v8i8_v2f32(<2 x float>* %p, <8 x i8>* %q) {
    484 ; CHECK: rev64 v{{[0-9]+}}.2s
    485 ; CHECK: rev64 v{{[0-9]+}}.8b
    486     %1 = load <2 x float>* %p
    487     %2 = fadd <2 x float> %1, %1
    488     %3 = call <8 x i8> @test_v8i8_v2f32_helper(<2 x float> %2)
    489     %4 = add <8 x i8> %3, %3
    490     store <8 x i8> %4, <8 x i8>* %q
    491     ret void
    492 }
    493 
    494 ; CHECK-LABEL: test_v8i8_v2i32:
    495 declare <8 x i8> @test_v8i8_v2i32_helper(<2 x i32> %p)
    496 define void @test_v8i8_v2i32(<2 x i32>* %p, <8 x i8>* %q) {
    497 ; CHECK: rev64 v{{[0-9]+}}.2s
    498 ; CHECK: rev64 v{{[0-9]+}}.8b
    499     %1 = load <2 x i32>* %p
    500     %2 = add <2 x i32> %1, %1
    501     %3 = call <8 x i8> @test_v8i8_v2i32_helper(<2 x i32> %2)
    502     %4 = add <8 x i8> %3, %3
    503     store <8 x i8> %4, <8 x i8>* %q
    504     ret void
    505 }
    506 
    507 ; CHECK-LABEL: test_v8i8_v4i16:
    508 declare <8 x i8> @test_v8i8_v4i16_helper(<4 x i16> %p)
    509 define void @test_v8i8_v4i16(<4 x i16>* %p, <8 x i8>* %q) {
    510 ; CHECK: rev64 v{{[0-9]+}}.4h
    511 ; CHECK: rev64 v{{[0-9]+}}.8b
    512     %1 = load <4 x i16>* %p
    513     %2 = add <4 x i16> %1, %1
    514     %3 = call <8 x i8> @test_v8i8_v4i16_helper(<4 x i16> %2)
    515     %4 = add <8 x i8> %3, %3
    516     store <8 x i8> %4, <8 x i8>* %q
    517     ret void
    518 }
    519 
    520 ; CHECK-LABEL: test_f128_v2f64:
    521 declare fp128 @test_f128_v2f64_helper(<2 x double> %p)
    522 define void @test_f128_v2f64(<2 x double>* %p, fp128* %q) {
    523 ; CHECK: ext
    524     %1 = load <2 x double>* %p
    525     %2 = fadd <2 x double> %1, %1
    526     %3 = call fp128 @test_f128_v2f64_helper(<2 x double> %2)
    527     %4 = fadd fp128 %3, %3
    528     store fp128 %4, fp128* %q
    529     ret void
    530 }
    531 
    532 ; CHECK-LABEL: test_f128_v2i64:
    533 declare fp128 @test_f128_v2i64_helper(<2 x i64> %p)
    534 define void @test_f128_v2i64(<2 x i64>* %p, fp128* %q) {
    535 ; CHECK: ext
    536     %1 = load <2 x i64>* %p
    537     %2 = add <2 x i64> %1, %1
    538     %3 = call fp128 @test_f128_v2i64_helper(<2 x i64> %2)
    539     %4 = fadd fp128 %3, %3
    540     store fp128 %4, fp128* %q
    541     ret void
    542 }
    543 
    544 ; CHECK-LABEL: test_f128_v4f32:
    545 declare fp128 @test_f128_v4f32_helper(<4 x float> %p)
    546 define void @test_f128_v4f32(<4 x float>* %p, fp128* %q) {
    547 ; CHECK: rev64 v{{[0-9]+}}.4s
    548 ; CHECK: ext
    549     %1 = load <4 x float>* %p
    550     %2 = fadd <4 x float> %1, %1
    551     %3 = call fp128 @test_f128_v4f32_helper(<4 x float> %2)
    552     %4 = fadd fp128 %3, %3
    553     store fp128 %4, fp128* %q
    554     ret void
    555 }
    556 
    557 ; CHECK-LABEL: test_f128_v4i32:
    558 declare fp128 @test_f128_v4i32_helper(<4 x i32> %p)
    559 define void @test_f128_v4i32(<4 x i32>* %p, fp128* %q) {
    560 ; CHECK: rev64 v{{[0-9]+}}.4s
    561 ; CHECK: ext
    562     %1 = load <4 x i32>* %p
    563     %2 = add <4 x i32> %1, %1
    564     %3 = call fp128 @test_f128_v4i32_helper(<4 x i32> %2)
    565     %4 = fadd fp128 %3, %3
    566     store fp128 %4, fp128* %q
    567     ret void
    568 }
    569 
    570 ; CHECK-LABEL: test_f128_v8i16:
    571 declare fp128 @test_f128_v8i16_helper(<8 x i16> %p)
    572 define void @test_f128_v8i16(<8 x i16>* %p, fp128* %q) {
    573 ; CHECK: rev64 v{{[0-9]+}}.8h
    574 ; CHECK: ext
    575     %1 = load <8 x i16>* %p
    576     %2 = add <8 x i16> %1, %1
    577     %3 = call fp128 @test_f128_v8i16_helper(<8 x i16> %2)
    578     %4 = fadd fp128 %3, %3
    579     store fp128 %4, fp128* %q
    580     ret void
    581 }
    582 
    583 ; CHECK-LABEL: test_f128_v16i8:
    584 declare fp128 @test_f128_v16i8_helper(<16 x i8> %p)
    585 define void @test_f128_v16i8(<16 x i8>* %p, fp128* %q) {
    586 ; CHECK: rev64 v{{[0-9]+}}.16b
    587 ; CHECK: ext
    588     %1 = load <16 x i8>* %p
    589     %2 = add <16 x i8> %1, %1
    590     %3 = call fp128 @test_f128_v16i8_helper(<16 x i8> %2)
    591     %4 = fadd fp128 %3, %3
    592     store fp128 %4, fp128* %q
    593     ret void
    594 }
    595 
    596 ; CHECK-LABEL: test_v2f64_f128:
    597 declare <2 x double> @test_v2f64_f128_helper(fp128 %p)
    598 define void @test_v2f64_f128(fp128* %p, <2 x double>* %q) {
    599 ; CHECK: ext
    600     %1 = load fp128* %p
    601     %2 = fadd fp128 %1, %1
    602     %3 = call <2 x double> @test_v2f64_f128_helper(fp128 %2)
    603     %4 = fadd <2 x double> %3, %3
    604     store <2 x double> %4, <2 x double>* %q
    605     ret void
    606 }
    607 
    608 ; CHECK-LABEL: test_v2f64_v2i64:
    609 declare <2 x double> @test_v2f64_v2i64_helper(<2 x i64> %p)
    610 define void @test_v2f64_v2i64(<2 x i64>* %p, <2 x double>* %q) {
    611 ; CHECK: ext
    612 ; CHECK: ext
    613     %1 = load <2 x i64>* %p
    614     %2 = add <2 x i64> %1, %1
    615     %3 = call <2 x double> @test_v2f64_v2i64_helper(<2 x i64> %2)
    616     %4 = fadd <2 x double> %3, %3
    617     store <2 x double> %4, <2 x double>* %q
    618     ret void
    619 }
    620 
    621 ; CHECK-LABEL: test_v2f64_v4f32:
    622 declare <2 x double> @test_v2f64_v4f32_helper(<4 x float> %p)
    623 define void @test_v2f64_v4f32(<4 x float>* %p, <2 x double>* %q) {
    624 ; CHECK: rev64 v{{[0-9]+}}.4s
    625 ; CHECK: ext
    626 ; CHECK: ext
    627     %1 = load <4 x float>* %p
    628     %2 = fadd <4 x float> %1, %1
    629     %3 = call <2 x double> @test_v2f64_v4f32_helper(<4 x float> %2)
    630     %4 = fadd <2 x double> %3, %3
    631     store <2 x double> %4, <2 x double>* %q
    632     ret void
    633 }
    634 
    635 ; CHECK-LABEL: test_v2f64_v4i32:
    636 declare <2 x double> @test_v2f64_v4i32_helper(<4 x i32> %p)
    637 define void @test_v2f64_v4i32(<4 x i32>* %p, <2 x double>* %q) {
    638 ; CHECK: rev64 v{{[0-9]+}}.4s
    639 ; CHECK: ext
    640 ; CHECK: ext
    641     %1 = load <4 x i32>* %p
    642     %2 = add <4 x i32> %1, %1
    643     %3 = call <2 x double> @test_v2f64_v4i32_helper(<4 x i32> %2)
    644     %4 = fadd <2 x double> %3, %3
    645     store <2 x double> %4, <2 x double>* %q
    646     ret void
    647 }
    648 
    649 ; CHECK-LABEL: test_v2f64_v8i16:
    650 declare <2 x double> @test_v2f64_v8i16_helper(<8 x i16> %p)
    651 define void @test_v2f64_v8i16(<8 x i16>* %p, <2 x double>* %q) {
    652 ; CHECK: rev64 v{{[0-9]+}}.8h
    653 ; CHECK: ext
    654 ; CHECK: ext
    655     %1 = load <8 x i16>* %p
    656     %2 = add <8 x i16> %1, %1
    657     %3 = call <2 x double> @test_v2f64_v8i16_helper(<8 x i16> %2)
    658     %4 = fadd <2 x double> %3, %3
    659     store <2 x double> %4, <2 x double>* %q
    660     ret void
    661 }
    662 
    663 ; CHECK-LABEL: test_v2f64_v16i8:
    664 declare <2 x double> @test_v2f64_v16i8_helper(<16 x i8> %p)
    665 define void @test_v2f64_v16i8(<16 x i8>* %p, <2 x double>* %q) {
    666 ; CHECK: rev64 v{{[0-9]+}}.16b
    667 ; CHECK: ext
    668 ; CHECK: ext
    669     %1 = load <16 x i8>* %p
    670     %2 = add <16 x i8> %1, %1
    671     %3 = call <2 x double> @test_v2f64_v16i8_helper(<16 x i8> %2)
    672     %4 = fadd <2 x double> %3, %3
    673     store <2 x double> %4, <2 x double>* %q
    674     ret void
    675 }
    676 
    677 ; CHECK-LABEL: test_v2i64_f128:
    678 declare <2 x i64> @test_v2i64_f128_helper(fp128 %p)
    679 define void @test_v2i64_f128(fp128* %p, <2 x i64>* %q) {
    680 ; CHECK: ext
    681     %1 = load fp128* %p
    682     %2 = fadd fp128 %1, %1
    683     %3 = call <2 x i64> @test_v2i64_f128_helper(fp128 %2)
    684     %4 = add <2 x i64> %3, %3
    685     store <2 x i64> %4, <2 x i64>* %q
    686     ret void
    687 }
    688 
    689 ; CHECK-LABEL: test_v2i64_v2f64:
    690 declare <2 x i64> @test_v2i64_v2f64_helper(<2 x double> %p)
    691 define void @test_v2i64_v2f64(<2 x double>* %p, <2 x i64>* %q) {
    692 ; CHECK: ext
    693 ; CHECK: ext
    694     %1 = load <2 x double>* %p
    695     %2 = fadd <2 x double> %1, %1
    696     %3 = call <2 x i64> @test_v2i64_v2f64_helper(<2 x double> %2)
    697     %4 = add <2 x i64> %3, %3
    698     store <2 x i64> %4, <2 x i64>* %q
    699     ret void
    700 }
    701 
    702 ; CHECK-LABEL: test_v2i64_v4f32:
    703 declare <2 x i64> @test_v2i64_v4f32_helper(<4 x float> %p)
    704 define void @test_v2i64_v4f32(<4 x float>* %p, <2 x i64>* %q) {
    705 ; CHECK: rev64 v{{[0-9]+}}.4s
    706 ; CHECK: ext
    707 ; CHECK: ext
    708     %1 = load <4 x float>* %p
    709     %2 = fadd <4 x float> %1, %1
    710     %3 = call <2 x i64> @test_v2i64_v4f32_helper(<4 x float> %2)
    711     %4 = add <2 x i64> %3, %3
    712     store <2 x i64> %4, <2 x i64>* %q
    713     ret void
    714 }
    715 
    716 ; CHECK-LABEL: test_v2i64_v4i32:
    717 declare <2 x i64> @test_v2i64_v4i32_helper(<4 x i32> %p)
    718 define void @test_v2i64_v4i32(<4 x i32>* %p, <2 x i64>* %q) {
    719 ; CHECK: rev64 v{{[0-9]+}}.4s
    720 ; CHECK: ext
    721 ; CHECK: ext
    722     %1 = load <4 x i32>* %p
    723     %2 = add <4 x i32> %1, %1
    724     %3 = call <2 x i64> @test_v2i64_v4i32_helper(<4 x i32> %2)
    725     %4 = add <2 x i64> %3, %3
    726     store <2 x i64> %4, <2 x i64>* %q
    727     ret void
    728 }
    729 
    730 ; CHECK-LABEL: test_v2i64_v8i16:
    731 declare <2 x i64> @test_v2i64_v8i16_helper(<8 x i16> %p)
    732 define void @test_v2i64_v8i16(<8 x i16>* %p, <2 x i64>* %q) {
    733 ; CHECK: rev64 v{{[0-9]+}}.8h
    734 ; CHECK: ext
    735 ; CHECK: ext
    736     %1 = load <8 x i16>* %p
    737     %2 = add <8 x i16> %1, %1
    738     %3 = call <2 x i64> @test_v2i64_v8i16_helper(<8 x i16> %2)
    739     %4 = add <2 x i64> %3, %3
    740     store <2 x i64> %4, <2 x i64>* %q
    741     ret void
    742 }
    743 
    744 ; CHECK-LABEL: test_v2i64_v16i8:
    745 declare <2 x i64> @test_v2i64_v16i8_helper(<16 x i8> %p)
    746 define void @test_v2i64_v16i8(<16 x i8>* %p, <2 x i64>* %q) {
    747 ; CHECK: rev64 v{{[0-9]+}}.16b
    748 ; CHECK: ext
    749 ; CHECK: ext
    750     %1 = load <16 x i8>* %p
    751     %2 = add <16 x i8> %1, %1
    752     %3 = call <2 x i64> @test_v2i64_v16i8_helper(<16 x i8> %2)
    753     %4 = add <2 x i64> %3, %3
    754     store <2 x i64> %4, <2 x i64>* %q
    755     ret void
    756 }
    757 
    758 ; CHECK-LABEL: test_v4f32_f128:
    759 declare <4 x float> @test_v4f32_f128_helper(fp128 %p)
    760 define void @test_v4f32_f128(fp128* %p, <4 x float>* %q) {
    761 ; CHECK: rev64 v{{[0-9]+}}.4s
    762 ; CHECK: ext
    763     %1 = load fp128* %p
    764     %2 = fadd fp128 %1, %1
    765     %3 = call <4 x float> @test_v4f32_f128_helper(fp128 %2)
    766     %4 = fadd <4 x float> %3, %3
    767     store <4 x float> %4, <4 x float>* %q
    768     ret void
    769 }
    770 
    771 ; CHECK-LABEL: test_v4f32_v2f64:
    772 declare <4 x float> @test_v4f32_v2f64_helper(<2 x double> %p)
    773 define void @test_v4f32_v2f64(<2 x double>* %p, <4 x float>* %q) {
    774 ; CHECK: ext
    775 ; CHECK: rev64 v{{[0-9]+}}.4s
    776 ; CHECK: ext
    777     %1 = load <2 x double>* %p
    778     %2 = fadd <2 x double> %1, %1
    779     %3 = call <4 x float> @test_v4f32_v2f64_helper(<2 x double> %2)
    780     %4 = fadd <4 x float> %3, %3
    781     store <4 x float> %4, <4 x float>* %q
    782     ret void
    783 }
    784 
    785 ; CHECK-LABEL: test_v4f32_v2i64:
    786 declare <4 x float> @test_v4f32_v2i64_helper(<2 x i64> %p)
    787 define void @test_v4f32_v2i64(<2 x i64>* %p, <4 x float>* %q) {
    788 ; CHECK: ext
    789 ; CHECK: rev64 v{{[0-9]+}}.4s
    790 ; CHECK: ext
    791     %1 = load <2 x i64>* %p
    792     %2 = add <2 x i64> %1, %1
    793     %3 = call <4 x float> @test_v4f32_v2i64_helper(<2 x i64> %2)
    794     %4 = fadd <4 x float> %3, %3
    795     store <4 x float> %4, <4 x float>* %q
    796     ret void
    797 }
    798 
    799 ; CHECK-LABEL: test_v4f32_v4i32:
    800 declare <4 x float> @test_v4f32_v4i32_helper(<4 x i32> %p)
    801 define void @test_v4f32_v4i32(<4 x i32>* %p, <4 x float>* %q) {
    802 ; CHECK: rev64 v{{[0-9]+}}.4s
    803 ; CHECK: ext
    804 ; CHECK: rev64 v{{[0-9]+}}.4s
    805 ; CHECK: ext
    806     %1 = load <4 x i32>* %p
    807     %2 = add <4 x i32> %1, %1
    808     %3 = call <4 x float> @test_v4f32_v4i32_helper(<4 x i32> %2)
    809     %4 = fadd <4 x float> %3, %3
    810     store <4 x float> %4, <4 x float>* %q
    811     ret void
    812 }
    813 
    814 ; CHECK-LABEL: test_v4f32_v8i16:
    815 declare <4 x float> @test_v4f32_v8i16_helper(<8 x i16> %p)
    816 define void @test_v4f32_v8i16(<8 x i16>* %p, <4 x float>* %q) {
    817 ; CHECK: rev64 v{{[0-9]+}}.8h
    818 ; CHECK: ext
    819 ; CHECK: rev64 v{{[0-9]+}}.4s
    820 ; CHECK: ext
    821     %1 = load <8 x i16>* %p
    822     %2 = add <8 x i16> %1, %1
    823     %3 = call <4 x float> @test_v4f32_v8i16_helper(<8 x i16> %2)
    824     %4 = fadd <4 x float> %3, %3
    825     store <4 x float> %4, <4 x float>* %q
    826     ret void
    827 }
    828 
    829 ; CHECK-LABEL: test_v4f32_v16i8:
    830 declare <4 x float> @test_v4f32_v16i8_helper(<16 x i8> %p)
    831 define void @test_v4f32_v16i8(<16 x i8>* %p, <4 x float>* %q) {
    832 ; CHECK: rev64 v{{[0-9]+}}.16b
    833 ; CHECK: ext
    834 ; CHECK: rev64 v{{[0-9]+}}.4s
    835 ; CHECK: ext
    836     %1 = load <16 x i8>* %p
    837     %2 = add <16 x i8> %1, %1
    838     %3 = call <4 x float> @test_v4f32_v16i8_helper(<16 x i8> %2)
    839     %4 = fadd <4 x float> %3, %3
    840     store <4 x float> %4, <4 x float>* %q
    841     ret void
    842 }
    843 
    844 ; CHECK-LABEL: test_v4i32_f128:
    845 declare <4 x i32> @test_v4i32_f128_helper(fp128 %p)
    846 define void @test_v4i32_f128(fp128* %p, <4 x i32>* %q) {
    847 ; CHECK: rev64 v{{[0-9]+}}.4s
    848 ; CHECK: ext
    849     %1 = load fp128* %p
    850     %2 = fadd fp128 %1, %1
    851     %3 = call <4 x i32> @test_v4i32_f128_helper(fp128 %2)
    852     %4 = add <4 x i32> %3, %3
    853     store <4 x i32> %4, <4 x i32>* %q
    854     ret void
    855 }
    856 
    857 ; CHECK-LABEL: test_v4i32_v2f64:
    858 declare <4 x i32> @test_v4i32_v2f64_helper(<2 x double> %p)
    859 define void @test_v4i32_v2f64(<2 x double>* %p, <4 x i32>* %q) {
    860 ; CHECK: ext
    861 ; CHECK: rev64 v{{[0-9]+}}.4s
    862 ; CHECK: ext
    863     %1 = load <2 x double>* %p
    864     %2 = fadd <2 x double> %1, %1
    865     %3 = call <4 x i32> @test_v4i32_v2f64_helper(<2 x double> %2)
    866     %4 = add <4 x i32> %3, %3
    867     store <4 x i32> %4, <4 x i32>* %q
    868     ret void
    869 }
    870 
    871 ; CHECK-LABEL: test_v4i32_v2i64:
    872 declare <4 x i32> @test_v4i32_v2i64_helper(<2 x i64> %p)
    873 define void @test_v4i32_v2i64(<2 x i64>* %p, <4 x i32>* %q) {
    874 ; CHECK: ext
    875 ; CHECK: rev64 v{{[0-9]+}}.4s
    876 ; CHECK: ext
    877     %1 = load <2 x i64>* %p
    878     %2 = add <2 x i64> %1, %1
    879     %3 = call <4 x i32> @test_v4i32_v2i64_helper(<2 x i64> %2)
    880     %4 = add <4 x i32> %3, %3
    881     store <4 x i32> %4, <4 x i32>* %q
    882     ret void
    883 }
    884 
    885 ; CHECK-LABEL: test_v4i32_v4f32:
    886 declare <4 x i32> @test_v4i32_v4f32_helper(<4 x float> %p)
    887 define void @test_v4i32_v4f32(<4 x float>* %p, <4 x i32>* %q) {
    888 ; CHECK: rev64 v{{[0-9]+}}.4s
    889 ; CHECK: ext
    890 ; CHECK: rev64 v{{[0-9]+}}.4s
    891 ; CHECK: ext
    892     %1 = load <4 x float>* %p
    893     %2 = fadd <4 x float> %1, %1
    894     %3 = call <4 x i32> @test_v4i32_v4f32_helper(<4 x float> %2)
    895     %4 = add <4 x i32> %3, %3
    896     store <4 x i32> %4, <4 x i32>* %q
    897     ret void
    898 }
    899 
    900 ; CHECK-LABEL: test_v4i32_v8i16:
    901 declare <4 x i32> @test_v4i32_v8i16_helper(<8 x i16> %p)
    902 define void @test_v4i32_v8i16(<8 x i16>* %p, <4 x i32>* %q) {
    903 ; CHECK: rev64 v{{[0-9]+}}.8h
    904 ; CHECK: ext
    905 ; CHECK: rev64 v{{[0-9]+}}.4s
    906 ; CHECK: ext
    907     %1 = load <8 x i16>* %p
    908     %2 = add <8 x i16> %1, %1
    909     %3 = call <4 x i32> @test_v4i32_v8i16_helper(<8 x i16> %2)
    910     %4 = add <4 x i32> %3, %3
    911     store <4 x i32> %4, <4 x i32>* %q
    912     ret void
    913 }
    914 
    915 ; CHECK-LABEL: test_v4i32_v16i8:
    916 declare <4 x i32> @test_v4i32_v16i8_helper(<16 x i8> %p)
    917 define void @test_v4i32_v16i8(<16 x i8>* %p, <4 x i32>* %q) {
    918 ; CHECK: rev64 v{{[0-9]+}}.16b
    919 ; CHECK: ext
    920 ; CHECK: rev64 v{{[0-9]+}}.4s
    921 ; CHECK: ext
    922     %1 = load <16 x i8>* %p
    923     %2 = add <16 x i8> %1, %1
    924     %3 = call <4 x i32> @test_v4i32_v16i8_helper(<16 x i8> %2)
    925     %4 = add <4 x i32> %3, %3
    926     store <4 x i32> %4, <4 x i32>* %q
    927     ret void
    928 }
    929 
    930 ; CHECK-LABEL: test_v8i16_f128:
    931 declare <8 x i16> @test_v8i16_f128_helper(fp128 %p)
    932 define void @test_v8i16_f128(fp128* %p, <8 x i16>* %q) {
    933 ; CHECK: rev64 v{{[0-9]+}}.8h
    934 ; CHECK: ext
    935     %1 = load fp128* %p
    936     %2 = fadd fp128 %1, %1
    937     %3 = call <8 x i16> @test_v8i16_f128_helper(fp128 %2)
    938     %4 = add <8 x i16> %3, %3
    939     store <8 x i16> %4, <8 x i16>* %q
    940     ret void
    941 }
    942 
    943 ; CHECK-LABEL: test_v8i16_v2f64:
    944 declare <8 x i16> @test_v8i16_v2f64_helper(<2 x double> %p)
    945 define void @test_v8i16_v2f64(<2 x double>* %p, <8 x i16>* %q) {
    946 ; CHECK: ext
    947 ; CHECK: rev64 v{{[0-9]+}}.8h
    948 ; CHECK: ext
    949     %1 = load <2 x double>* %p
    950     %2 = fadd <2 x double> %1, %1
    951     %3 = call <8 x i16> @test_v8i16_v2f64_helper(<2 x double> %2)
    952     %4 = add <8 x i16> %3, %3
    953     store <8 x i16> %4, <8 x i16>* %q
    954     ret void
    955 }
    956 
    957 ; CHECK-LABEL: test_v8i16_v2i64:
    958 declare <8 x i16> @test_v8i16_v2i64_helper(<2 x i64> %p)
    959 define void @test_v8i16_v2i64(<2 x i64>* %p, <8 x i16>* %q) {
    960 ; CHECK: ext
    961 ; CHECK: rev64 v{{[0-9]+}}.8h
    962 ; CHECK: ext
    963     %1 = load <2 x i64>* %p
    964     %2 = add <2 x i64> %1, %1
    965     %3 = call <8 x i16> @test_v8i16_v2i64_helper(<2 x i64> %2)
    966     %4 = add <8 x i16> %3, %3
    967     store <8 x i16> %4, <8 x i16>* %q
    968     ret void
    969 }
    970 
    971 ; CHECK-LABEL: test_v8i16_v4f32:
    972 declare <8 x i16> @test_v8i16_v4f32_helper(<4 x float> %p)
    973 define void @test_v8i16_v4f32(<4 x float>* %p, <8 x i16>* %q) {
    974 ; CHECK: rev64 v{{[0-9]+}}.4s
    975 ; CHECK: ext
    976 ; CHECK: rev64 v{{[0-9]+}}.8h
    977 ; CHECK: ext
    978     %1 = load <4 x float>* %p
    979     %2 = fadd <4 x float> %1, %1
    980     %3 = call <8 x i16> @test_v8i16_v4f32_helper(<4 x float> %2)
    981     %4 = add <8 x i16> %3, %3
    982     store <8 x i16> %4, <8 x i16>* %q
    983     ret void
    984 }
    985 
    986 ; CHECK-LABEL: test_v8i16_v4i32:
    987 declare <8 x i16> @test_v8i16_v4i32_helper(<4 x i32> %p)
    988 define void @test_v8i16_v4i32(<4 x i32>* %p, <8 x i16>* %q) {
    989 ; CHECK: rev64 v{{[0-9]+}}.4s
    990 ; CHECK: ext
    991 ; CHECK: rev64 v{{[0-9]+}}.8h
    992 ; CHECK: ext
    993     %1 = load <4 x i32>* %p
    994     %2 = add <4 x i32> %1, %1
    995     %3 = call <8 x i16> @test_v8i16_v4i32_helper(<4 x i32> %2)
    996     %4 = add <8 x i16> %3, %3
    997     store <8 x i16> %4, <8 x i16>* %q
    998     ret void
    999 }
   1000 
   1001 ; CHECK-LABEL: test_v8i16_v16i8:
   1002 declare <8 x i16> @test_v8i16_v16i8_helper(<16 x i8> %p)
   1003 define void @test_v8i16_v16i8(<16 x i8>* %p, <8 x i16>* %q) {
   1004 ; CHECK: rev64 v{{[0-9]+}}.16b
   1005 ; CHECK: ext
   1006 ; CHECK: rev64 v{{[0-9]+}}.8h
   1007 ; CHECK: ext
   1008     %1 = load <16 x i8>* %p
   1009     %2 = add <16 x i8> %1, %1
   1010     %3 = call <8 x i16> @test_v8i16_v16i8_helper(<16 x i8> %2)
   1011     %4 = add <8 x i16> %3, %3
   1012     store <8 x i16> %4, <8 x i16>* %q
   1013     ret void
   1014 }
   1015 
   1016 ; CHECK-LABEL: test_v16i8_f128:
   1017 declare <16 x i8> @test_v16i8_f128_helper(fp128 %p)
   1018 define void @test_v16i8_f128(fp128* %p, <16 x i8>* %q) {
   1019 ; CHECK: rev64 v{{[0-9]+}}.16b
   1020 ; CHECK: ext
   1021     %1 = load fp128* %p
   1022     %2 = fadd fp128 %1, %1
   1023     %3 = call <16 x i8> @test_v16i8_f128_helper(fp128 %2)
   1024     %4 = add <16 x i8> %3, %3
   1025     store <16 x i8> %4, <16 x i8>* %q
   1026     ret void
   1027 }
   1028 
   1029 ; CHECK-LABEL: test_v16i8_v2f64:
   1030 declare <16 x i8> @test_v16i8_v2f64_helper(<2 x double> %p)
   1031 define void @test_v16i8_v2f64(<2 x double>* %p, <16 x i8>* %q) {
   1032 ; CHECK: ext
   1033 ; CHECK: rev64 v{{[0-9]+}}.16b
   1034 ; CHECK: ext
   1035     %1 = load <2 x double>* %p
   1036     %2 = fadd <2 x double> %1, %1
   1037     %3 = call <16 x i8> @test_v16i8_v2f64_helper(<2 x double> %2)
   1038     %4 = add <16 x i8> %3, %3
   1039     store <16 x i8> %4, <16 x i8>* %q
   1040     ret void
   1041 }
   1042 
   1043 ; CHECK-LABEL: test_v16i8_v2i64:
   1044 declare <16 x i8> @test_v16i8_v2i64_helper(<2 x i64> %p)
   1045 define void @test_v16i8_v2i64(<2 x i64>* %p, <16 x i8>* %q) {
   1046 ; CHECK: ext
   1047 ; CHECK: rev64 v{{[0-9]+}}.16b
   1048 ; CHECK: ext
   1049     %1 = load <2 x i64>* %p
   1050     %2 = add <2 x i64> %1, %1
   1051     %3 = call <16 x i8> @test_v16i8_v2i64_helper(<2 x i64> %2)
   1052     %4 = add <16 x i8> %3, %3
   1053     store <16 x i8> %4, <16 x i8>* %q
   1054     ret void
   1055 }
   1056 
   1057 ; CHECK-LABEL: test_v16i8_v4f32:
   1058 declare <16 x i8> @test_v16i8_v4f32_helper(<4 x float> %p)
   1059 define void @test_v16i8_v4f32(<4 x float>* %p, <16 x i8>* %q) {
   1060 ; CHECK: rev64 v{{[0-9]+}}.4s
   1061 ; CHECK: ext
   1062 ; CHECK: rev64 v{{[0-9]+}}.16b
   1063 ; CHECK: ext
   1064     %1 = load <4 x float>* %p
   1065     %2 = fadd <4 x float> %1, %1
   1066     %3 = call <16 x i8> @test_v16i8_v4f32_helper(<4 x float> %2)
   1067     %4 = add <16 x i8> %3, %3
   1068     store <16 x i8> %4, <16 x i8>* %q
   1069     ret void
   1070 }
   1071 
   1072 ; CHECK-LABEL: test_v16i8_v4i32:
   1073 declare <16 x i8> @test_v16i8_v4i32_helper(<4 x i32> %p)
   1074 define void @test_v16i8_v4i32(<4 x i32>* %p, <16 x i8>* %q) {
   1075 ; CHECK: rev64 v{{[0-9]+}}.4s
   1076 ; CHECK: ext
   1077 ; CHECK: rev64 v{{[0-9]+}}.16b
   1078 ; CHECK: ext
   1079     %1 = load <4 x i32>* %p
   1080     %2 = add <4 x i32> %1, %1
   1081     %3 = call <16 x i8> @test_v16i8_v4i32_helper(<4 x i32> %2)
   1082     %4 = add <16 x i8> %3, %3
   1083     store <16 x i8> %4, <16 x i8>* %q
   1084     ret void
   1085 }
   1086 
   1087 ; CHECK-LABEL: test_v16i8_v8i16:
   1088 declare <16 x i8> @test_v16i8_v8i16_helper(<8 x i16> %p)
   1089 define void @test_v16i8_v8i16(<8 x i16>* %p, <16 x i8>* %q) {
   1090 ; CHECK: rev64 v{{[0-9]+}}.8h
   1091 ; CHECK: ext
   1092 ; CHECK: rev64 v{{[0-9]+}}.16b
   1093 ; CHECK: ext
   1094     %1 = load <8 x i16>* %p
   1095     %2 = add <8 x i16> %1, %1
   1096     %3 = call <16 x i8> @test_v16i8_v8i16_helper(<8 x i16> %2)
   1097     %4 = add <16 x i8> %3, %3
   1098     store <16 x i8> %4, <16 x i8>* %q
   1099     ret void
   1100 }
   1101