Home | History | Annotate | Download | only in SystemZ
      1 ; Test vector replicates that use VECTOR GENERATE MASK, v2f64 version.
      2 ;
      3 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s
      4 
      5 ; Test a word-granularity replicate with the lowest value that cannot use
      6 ; VREPIF.
      7 define <2 x double> @f1() {
      8 ; CHECK-LABEL: f1:
      9 ; CHECK: vgmf %v24, 16, 16
     10 ; CHECK: br %r14
     11   ret <2 x double> <double 0x0000800000008000, double 0x0000800000008000>
     12 }
     13 
     14 ; Test a word-granularity replicate that has the lower 17 bits set.
     15 define <2 x double> @f2() {
     16 ; CHECK-LABEL: f2:
     17 ; CHECK: vgmf %v24, 15, 31
     18 ; CHECK: br %r14
     19   ret <2 x double> <double 0x0001ffff0001ffff, double 0x0001ffff0001ffff>
     20 }
     21 
     22 ; Test a word-granularity replicate that has the upper 15 bits set.
     23 define <2 x double> @f3() {
     24 ; CHECK-LABEL: f3:
     25 ; CHECK: vgmf %v24, 0, 14
     26 ; CHECK: br %r14
     27   ret <2 x double> <double 0xfffe0000fffe0000, double 0xfffe0000fffe0000>
     28 }
     29 
     30 ; Test a word-granularity replicate that has middle bits set.
     31 define <2 x double> @f4() {
     32 ; CHECK-LABEL: f4:
     33 ; CHECK: vgmf %v24, 2, 11
     34 ; CHECK: br %r14
     35   ret <2 x double> <double 0x3ff000003ff00000, double 0x3ff000003ff00000>
     36 }
     37 
     38 ; Test a word-granularity replicate with a wrap-around mask.
     39 define <2 x double> @f5() {
     40 ; CHECK-LABEL: f5:
     41 ; CHECK: vgmf %v24, 17, 15
     42 ; CHECK: br %r14
     43   ret <2 x double> <double 0xffff7fffffff7fff, double 0xffff7fffffff7fff>
     44 }
     45 
     46 ; Test a doubleword-granularity replicate with the lowest value that cannot
     47 ; use VREPIG.
     48 define <2 x double> @f6() {
     49 ; CHECK-LABEL: f6:
     50 ; CHECK: vgmg %v24, 48, 48
     51 ; CHECK: br %r14
     52   ret <2 x double> <double 0x0000000000008000, double 0x0000000000008000>
     53 }
     54 
     55 ; Test a doubleword-granularity replicate that has the lower 22 bits set.
     56 define <2 x double> @f7() {
     57 ; CHECK-LABEL: f7:
     58 ; CHECK: vgmg %v24, 42, 63
     59 ; CHECK: br %r14
     60   ret <2 x double> <double 0x000000000003fffff, double 0x000000000003fffff>
     61 }
     62 
     63 ; Test a doubleword-granularity replicate that has the upper 45 bits set.
     64 define <2 x double> @f8() {
     65 ; CHECK-LABEL: f8:
     66 ; CHECK: vgmg %v24, 0, 44
     67 ; CHECK: br %r14
     68   ret <2 x double> <double 0xfffffffffff80000, double 0xfffffffffff80000>
     69 }
     70 
     71 ; Test a doubleword-granularity replicate that has middle bits set.
     72 define <2 x double> @f9() {
     73 ; CHECK-LABEL: f9:
     74 ; CHECK: vgmg %v24, 2, 11
     75 ; CHECK: br %r14
     76   ret <2 x double> <double 0x3ff0000000000000, double 0x3ff0000000000000>
     77 }
     78 
     79 ; Test a doubleword-granularity replicate with a wrap-around mask.
     80 define <2 x double> @f10() {
     81 ; CHECK-LABEL: f10:
     82 ; CHECK: vgmg %v24, 10, 0
     83 ; CHECK: br %r14
     84   ret <2 x double> <double 0x803fffffffffffff, double 0x803fffffffffffff>
     85 }
     86