Home | History | Annotate | Download | only in SystemZ
      1 ; Test vector byte masks, v2i64 version.
      2 ;
      3 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s
      4 
      5 ; Test an all-zeros vector.
      6 define <2 x i64> @f1() {
      7 ; CHECK-LABEL: f1:
      8 ; CHECK: vgbm %v24, 0
      9 ; CHECK: br %r14
     10   ret <2 x i64> zeroinitializer
     11 }
     12 
     13 ; Test an all-ones vector.
     14 define <2 x i64> @f2() {
     15 ; CHECK-LABEL: f2:
     16 ; CHECK: vgbm %v24, 65535
     17 ; CHECK: br %r14
     18   ret <2 x i64> <i64 -1, i64 -1>
     19 }
     20 
     21 ; Test a mixed vector (mask 0x8c76).
     22 define <2 x i64> @f3() {
     23 ; CHECK-LABEL: f3:
     24 ; CHECK: vgbm %v24, 35958
     25 ; CHECK: br %r14
     26   ret <2 x i64> <i64 18374686483966525440, i64 72057589759737600>
     27 }
     28 
     29 ; Test that undefs are treated as zero (mask 0x8c00).
     30 define <2 x i64> @f4() {
     31 ; CHECK-LABEL: f4:
     32 ; CHECK: vgbm %v24, 35840
     33 ; CHECK: br %r14
     34   ret <2 x i64> <i64 18374686483966525440, i64 undef>
     35 }
     36 
     37 ; Test that we don't use VGBM if one of the bytes is not 0 or 0xff.
     38 define <2 x i64> @f5() {
     39 ; CHECK-LABEL: f5:
     40 ; CHECK-NOT: vgbm
     41 ; CHECK: br %r14
     42   ret <2 x i64> <i64 18374686483966525441, i64 72057589759737600>
     43 }
     44