96 lines · plain
1; Test vector replicates that use VECTOR GENERATE MASK, v4f32 version.2;3; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s4 5; Test a word-granularity replicate with the lowest value that cannot use6; VREPIF.7define <4 x float> @f1() {8; CHECK-LABEL: f1:9; CHECK: vgmf %v24, 16, 1610; CHECK: br %r1411 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.16define <4 x float> @f2() {17; CHECK-LABEL: f2:18; CHECK: vgmf %v24, 15, 3119; CHECK: br %r1420 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.25define <4 x float> @f3() {26; CHECK-LABEL: f3:27; CHECK: vgmf %v24, 0, 1428; CHECK: br %r1429 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.34define <4 x float> @f4() {35; CHECK-LABEL: f4:36; CHECK: vgmf %v24, 2, 837; CHECK: br %r1438 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.43define <4 x float> @f5() {44; CHECK-LABEL: f5:45; CHECK: vgmf %v24, 9, 146; CHECK: br %r1447 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 cannot52; use VREPIG.53define <4 x float> @f6() {54; CHECK-LABEL: f6:55; CHECK: vgmg %v24, 48, 4856; CHECK: br %r1457 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.62define <4 x float> @f7() {63; CHECK-LABEL: f7:64; CHECK: vgmg %v24, 42, 6365; CHECK: br %r1466 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.71define <4 x float> @f8() {72; CHECK-LABEL: f8:73; CHECK: vgmg %v24, 0, 4474; CHECK: br %r1475 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.80define <4 x float> @f9() {81; CHECK-LABEL: f9:82; CHECK: vgmg %v24, 34, 4183; CHECK: br %r1484 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.89define <4 x float> @f10() {90; CHECK-LABEL: f10:91; CHECK: vgmg %v24, 32, 092; CHECK: br %r1493 ret <4 x float> <float 0x8000000000000000, float 0xffffffffe0000000,94 float 0x8000000000000000, float 0xffffffffe0000000>95}96