Home | History | Annotate | Download | only in SystemZ
      1 ; Test vector replicates that use VECTOR GENERATE MASK, v4f32 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 <4 x float> @f1() {
      8 ; CHECK-LABEL: f1:
      9 ; CHECK: vgmf %v24, 16, 16
     10 ; CHECK: br %r14
     11   ret <4 x float> <float 0x3790000000000000, float 0x3790000000000000,
     12                    float 0x3790000000000000, float 0x3790000000000000>
     13 }
     14 
     15 ; Test a word-granularity replicate that has the lower 17 bits set.
     16 define <4 x float> @f2() {
     17 ; CHECK-LABEL: f2:
     18 ; CHECK: vgmf %v24, 15, 31
     19 ; CHECK: br %r14
     20   ret <4 x float> <float 0x37affff000000000, float 0x37affff000000000,
     21                    float 0x37affff000000000, float 0x37affff000000000>
     22 }
     23 
     24 ; Test a word-granularity replicate that has the upper 15 bits set.
     25 define <4 x float> @f3() {
     26 ; CHECK-LABEL: f3:
     27 ; CHECK: vgmf %v24, 0, 14
     28 ; CHECK: br %r14
     29   ret <4 x float> <float 0xffffc00000000000, float 0xffffc00000000000,
     30                    float 0xffffc00000000000, float 0xffffc00000000000>
     31 }
     32 
     33 ; Test a word-granularity replicate that has middle bits set.
     34 define <4 x float> @f4() {
     35 ; CHECK-LABEL: f4:
     36 ; CHECK: vgmf %v24, 2, 8
     37 ; CHECK: br %r14
     38   ret <4 x float> <float 0x3ff0000000000000, float 0x3ff0000000000000,
     39                    float 0x3ff0000000000000, float 0x3ff0000000000000>
     40 }
     41 
     42 ; Test a word-granularity replicate with a wrap-around mask.
     43 define <4 x float> @f5() {
     44 ; CHECK-LABEL: f5:
     45 ; CHECK: vgmf %v24, 9, 1
     46 ; CHECK: br %r14
     47   ret <4 x float> <float 0xc00fffffe0000000, float 0xc00fffffe0000000,
     48                    float 0xc00fffffe0000000, float 0xc00fffffe0000000>
     49 }
     50 
     51 ; Test a doubleword-granularity replicate with the lowest value that cannot
     52 ; use VREPIG.
     53 define <4 x float> @f6() {
     54 ; CHECK-LABEL: f6:
     55 ; CHECK: vgmg %v24, 48, 48
     56 ; CHECK: br %r14
     57   ret <4 x float> <float 0.0, float 0x3790000000000000,
     58                    float 0.0, float 0x3790000000000000>
     59 }
     60 
     61 ; Test a doubleword-granularity replicate that has the lower 22 bits set.
     62 define <4 x float> @f7() {
     63 ; CHECK-LABEL: f7:
     64 ; CHECK: vgmg %v24, 42, 63
     65 ; CHECK: br %r14
     66   ret <4 x float> <float 0.0, float 0x37ffffff80000000,
     67                    float 0.0, float 0x37ffffff80000000>
     68 }
     69 
     70 ; Test a doubleword-granularity replicate that has the upper 45 bits set.
     71 define <4 x float> @f8() {
     72 ; CHECK-LABEL: f8:
     73 ; CHECK: vgmg %v24, 0, 44
     74 ; CHECK: br %r14
     75   ret <4 x float> <float 0xffffffffe0000000, float 0xffff000000000000,
     76                    float 0xffffffffe0000000, float 0xffff000000000000>
     77 }
     78 
     79 ; Test a doubleword-granularity replicate that has middle bits set.
     80 define <4 x float> @f9() {
     81 ; CHECK-LABEL: f9:
     82 ; CHECK: vgmg %v24, 34, 41
     83 ; CHECK: br %r14
     84   ret <4 x float> <float 0.0, float 0x3ff8000000000000,
     85                    float 0.0, float 0x3ff8000000000000>
     86 }
     87 
     88 ; Test a doubleword-granularity replicate with a wrap-around mask.
     89 define <4 x float> @f10() {
     90 ; CHECK-LABEL: f10:
     91 ; CHECK: vgmg %v24, 32, 0
     92 ; CHECK: br %r14
     93   ret <4 x float> <float 0x8000000000000000, float 0xffffffffe0000000,
     94                    float 0x8000000000000000, float 0xffffffffe0000000>
     95 }
     96