1*80b3af7aSUlrich Weigand; Test vector replicates, v4f32 version. 2*80b3af7aSUlrich Weigand; 3*80b3af7aSUlrich Weigand; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s 4*80b3af7aSUlrich Weigand 5*80b3af7aSUlrich Weigand; Test a byte-granularity replicate with the lowest useful value. 6*80b3af7aSUlrich Weiganddefine <4 x float> @f1() { 7*80b3af7aSUlrich Weigand; CHECK-LABEL: f1: 8*80b3af7aSUlrich Weigand; CHECK: vrepib %v24, 1 9*80b3af7aSUlrich Weigand; CHECK: br %r14 10*80b3af7aSUlrich Weigand ret <4 x float> <float 0x3820202020000000, float 0x3820202020000000, 11*80b3af7aSUlrich Weigand float 0x3820202020000000, float 0x3820202020000000> 12*80b3af7aSUlrich Weigand} 13*80b3af7aSUlrich Weigand 14*80b3af7aSUlrich Weigand; Test a byte-granularity replicate with an arbitrary value. 15*80b3af7aSUlrich Weiganddefine <4 x float> @f2() { 16*80b3af7aSUlrich Weigand; CHECK-LABEL: f2: 17*80b3af7aSUlrich Weigand; CHECK: vrepib %v24, -55 18*80b3af7aSUlrich Weigand; CHECK: br %r14 19*80b3af7aSUlrich Weigand ret <4 x float> <float 0xc139393920000000, float 0xc139393920000000, 20*80b3af7aSUlrich Weigand float 0xc139393920000000, float 0xc139393920000000> 21*80b3af7aSUlrich Weigand} 22*80b3af7aSUlrich Weigand 23*80b3af7aSUlrich Weigand; Test a byte-granularity replicate with the highest useful value. 24*80b3af7aSUlrich Weiganddefine <4 x float> @f3() { 25*80b3af7aSUlrich Weigand; CHECK-LABEL: f3: 26*80b3af7aSUlrich Weigand; CHECK: vrepib %v24, -2 27*80b3af7aSUlrich Weigand; CHECK: br %r14 28*80b3af7aSUlrich Weigand ret <4 x float> <float 0xc7dfdfdfc0000000, float 0xc7dfdfdfc0000000, 29*80b3af7aSUlrich Weigand float 0xc7dfdfdfc0000000, float 0xc7dfdfdfc0000000> 30*80b3af7aSUlrich Weigand} 31*80b3af7aSUlrich Weigand 32*80b3af7aSUlrich Weigand; Test a halfword-granularity replicate with the lowest useful value. 33*80b3af7aSUlrich Weiganddefine <4 x float> @f4() { 34*80b3af7aSUlrich Weigand; CHECK-LABEL: f4: 35*80b3af7aSUlrich Weigand; CHECK: vrepih %v24, 1 36*80b3af7aSUlrich Weigand; CHECK: br %r14 37*80b3af7aSUlrich Weigand ret <4 x float> <float 0x37a0001000000000, float 0x37a0001000000000, 38*80b3af7aSUlrich Weigand float 0x37a0001000000000, float 0x37a0001000000000> 39*80b3af7aSUlrich Weigand} 40*80b3af7aSUlrich Weigand 41*80b3af7aSUlrich Weigand; Test a halfword-granularity replicate with an arbitrary value. 42*80b3af7aSUlrich Weiganddefine <4 x float> @f5() { 43*80b3af7aSUlrich Weigand; CHECK-LABEL: f5: 44*80b3af7aSUlrich Weigand; CHECK: vrepih %v24, 25650 45*80b3af7aSUlrich Weigand; CHECK: br %r14 46*80b3af7aSUlrich Weigand ret <4 x float> <float 0x44864c8640000000, float 0x44864c8640000000, 47*80b3af7aSUlrich Weigand float 0x44864c8640000000, float 0x44864c8640000000> 48*80b3af7aSUlrich Weigand} 49*80b3af7aSUlrich Weigand 50*80b3af7aSUlrich Weigand; Test a halfword-granularity replicate with the highest useful value. 51*80b3af7aSUlrich Weiganddefine <4 x float> @f6() { 52*80b3af7aSUlrich Weigand; CHECK-LABEL: f6: 53*80b3af7aSUlrich Weigand; CHECK: vrepih %v24, -2 54*80b3af7aSUlrich Weigand; CHECK: br %r14 55*80b3af7aSUlrich Weigand ret <4 x float> <float 0xffffdfffc0000000, float 0xffffdfffc0000000, 56*80b3af7aSUlrich Weigand float 0xffffdfffc0000000, float 0xffffdfffc0000000> 57*80b3af7aSUlrich Weigand} 58*80b3af7aSUlrich Weigand 59*80b3af7aSUlrich Weigand; Test a word-granularity replicate with the lowest useful positive value. 60*80b3af7aSUlrich Weiganddefine <4 x float> @f7() { 61*80b3af7aSUlrich Weigand; CHECK-LABEL: f7: 62*80b3af7aSUlrich Weigand; CHECK: vrepif %v24, 1 63*80b3af7aSUlrich Weigand; CHECK: br %r14 64*80b3af7aSUlrich Weigand ret <4 x float> <float 0x36a0000000000000, float 0x36a0000000000000, 65*80b3af7aSUlrich Weigand float 0x36a0000000000000, float 0x36a0000000000000> 66*80b3af7aSUlrich Weigand} 67*80b3af7aSUlrich Weigand 68*80b3af7aSUlrich Weigand; Test a word-granularity replicate with the highest in-range value. 69*80b3af7aSUlrich Weiganddefine <4 x float> @f8() { 70*80b3af7aSUlrich Weigand; CHECK-LABEL: f8: 71*80b3af7aSUlrich Weigand; CHECK: vrepif %v24, 32767 72*80b3af7aSUlrich Weigand; CHECK: br %r14 73*80b3af7aSUlrich Weigand ret <4 x float> <float 0x378fffc000000000, float 0x378fffc000000000, 74*80b3af7aSUlrich Weigand float 0x378fffc000000000, float 0x378fffc000000000> 75*80b3af7aSUlrich Weigand} 76*80b3af7aSUlrich Weigand 77*80b3af7aSUlrich Weigand; Test a word-granularity replicate with the next highest value. 78*80b3af7aSUlrich Weigand; This cannot use VREPIF. 79*80b3af7aSUlrich Weiganddefine <4 x float> @f9() { 80*80b3af7aSUlrich Weigand; CHECK-LABEL: f9: 81*80b3af7aSUlrich Weigand; CHECK-NOT: vrepif 82*80b3af7aSUlrich Weigand; CHECK: br %r14 83*80b3af7aSUlrich Weigand ret <4 x float> <float 0x3790000000000000, float 0x3790000000000000, 84*80b3af7aSUlrich Weigand float 0x3790000000000000, float 0x3790000000000000> 85*80b3af7aSUlrich Weigand} 86*80b3af7aSUlrich Weigand 87*80b3af7aSUlrich Weigand; Test a word-granularity replicate with the lowest in-range value. 88*80b3af7aSUlrich Weiganddefine <4 x float> @f10() { 89*80b3af7aSUlrich Weigand; CHECK-LABEL: f10: 90*80b3af7aSUlrich Weigand; CHECK: vrepif %v24, -32768 91*80b3af7aSUlrich Weigand; CHECK: br %r14 92*80b3af7aSUlrich Weigand ret <4 x float> <float 0xfffff00000000000, float 0xfffff00000000000, 93*80b3af7aSUlrich Weigand float 0xfffff00000000000, float 0xfffff00000000000> 94*80b3af7aSUlrich Weigand} 95*80b3af7aSUlrich Weigand 96*80b3af7aSUlrich Weigand; Test a word-granularity replicate with the next lowest value. 97*80b3af7aSUlrich Weigand; This cannot use VREPIF. 98*80b3af7aSUlrich Weiganddefine <4 x float> @f11() { 99*80b3af7aSUlrich Weigand; CHECK-LABEL: f11: 100*80b3af7aSUlrich Weigand; CHECK-NOT: vrepif 101*80b3af7aSUlrich Weigand; CHECK: br %r14 102*80b3af7aSUlrich Weigand ret <4 x float> <float 0xffffefffe0000000, float 0xffffefffe0000000, 103*80b3af7aSUlrich Weigand float 0xffffefffe0000000, float 0xffffefffe0000000> 104*80b3af7aSUlrich Weigand} 105*80b3af7aSUlrich Weigand 106*80b3af7aSUlrich Weigand; Test a word-granularity replicate with the highest useful negative value. 107*80b3af7aSUlrich Weiganddefine <4 x float> @f12() { 108*80b3af7aSUlrich Weigand; CHECK-LABEL: f12: 109*80b3af7aSUlrich Weigand; CHECK: vrepif %v24, -2 110*80b3af7aSUlrich Weigand; CHECK: br %r14 111*80b3af7aSUlrich Weigand ret <4 x float> <float 0xffffffffc0000000, float 0xffffffffc0000000, 112*80b3af7aSUlrich Weigand float 0xffffffffc0000000, float 0xffffffffc0000000> 113*80b3af7aSUlrich Weigand} 114*80b3af7aSUlrich Weigand 115*80b3af7aSUlrich Weigand; Test a doubleword-granularity replicate with the lowest useful positive 116*80b3af7aSUlrich Weigand; value. 117*80b3af7aSUlrich Weiganddefine <4 x float> @f13() { 118*80b3af7aSUlrich Weigand; CHECK-LABEL: f13: 119*80b3af7aSUlrich Weigand; CHECK: vrepig %v24, 1 120*80b3af7aSUlrich Weigand; CHECK: br %r14 121*80b3af7aSUlrich Weigand ret <4 x float> <float 0.0, float 0x36a0000000000000, 122*80b3af7aSUlrich Weigand float 0.0, float 0x36a0000000000000> 123*80b3af7aSUlrich Weigand} 124*80b3af7aSUlrich Weigand 125*80b3af7aSUlrich Weigand; Test a doubleword-granularity replicate with the highest in-range value. 126*80b3af7aSUlrich Weiganddefine <4 x float> @f14() { 127*80b3af7aSUlrich Weigand; CHECK-LABEL: f14: 128*80b3af7aSUlrich Weigand; CHECK: vrepig %v24, 32767 129*80b3af7aSUlrich Weigand; CHECK: br %r14 130*80b3af7aSUlrich Weigand ret <4 x float> <float 0.0, float 0x378fffc000000000, 131*80b3af7aSUlrich Weigand float 0.0, float 0x378fffc000000000> 132*80b3af7aSUlrich Weigand} 133*80b3af7aSUlrich Weigand 134*80b3af7aSUlrich Weigand; Test a doubleword-granularity replicate with the next highest value. 135*80b3af7aSUlrich Weigand; This cannot use VREPIG. 136*80b3af7aSUlrich Weiganddefine <4 x float> @f15() { 137*80b3af7aSUlrich Weigand; CHECK-LABEL: f15: 138*80b3af7aSUlrich Weigand; CHECK-NOT: vrepig 139*80b3af7aSUlrich Weigand; CHECK: br %r14 140*80b3af7aSUlrich Weigand ret <4 x float> <float 0.0, float 0x3790000000000000, 141*80b3af7aSUlrich Weigand float 0.0, float 0x3790000000000000> 142*80b3af7aSUlrich Weigand} 143*80b3af7aSUlrich Weigand 144*80b3af7aSUlrich Weigand; Test a doubleword-granularity replicate with the lowest in-range value. 145*80b3af7aSUlrich Weiganddefine <4 x float> @f16() { 146*80b3af7aSUlrich Weigand; CHECK-LABEL: f16: 147*80b3af7aSUlrich Weigand; CHECK: vrepig %v24, -32768 148*80b3af7aSUlrich Weigand; CHECK: br %r14 149*80b3af7aSUlrich Weigand ret <4 x float> <float 0xffffffffe0000000, float 0xfffff00000000000, 150*80b3af7aSUlrich Weigand float 0xffffffffe0000000, float 0xfffff00000000000> 151*80b3af7aSUlrich Weigand} 152*80b3af7aSUlrich Weigand 153*80b3af7aSUlrich Weigand; Test a doubleword-granularity replicate with the next lowest value. 154*80b3af7aSUlrich Weigand; This cannot use VREPIG. 155*80b3af7aSUlrich Weiganddefine <4 x float> @f17() { 156*80b3af7aSUlrich Weigand; CHECK-LABEL: f17: 157*80b3af7aSUlrich Weigand; CHECK-NOT: vrepig 158*80b3af7aSUlrich Weigand; CHECK: br %r14 159*80b3af7aSUlrich Weigand ret <4 x float> <float 0xffffffffe0000000, float 0xffffefffe0000000, 160*80b3af7aSUlrich Weigand float 0xffffffffe0000000, float 0xffffefffe0000000> 161*80b3af7aSUlrich Weigand} 162*80b3af7aSUlrich Weigand 163*80b3af7aSUlrich Weigand; Test a doubleword-granularity replicate with the highest useful negative 164*80b3af7aSUlrich Weigand; value. 165*80b3af7aSUlrich Weiganddefine <4 x float> @f18() { 166*80b3af7aSUlrich Weigand; CHECK-LABEL: f18: 167*80b3af7aSUlrich Weigand; CHECK: vrepig %v24, -2 168*80b3af7aSUlrich Weigand; CHECK: br %r14 169*80b3af7aSUlrich Weigand ret <4 x float> <float 0xffffffffe0000000, float 0xffffffffc0000000, 170*80b3af7aSUlrich Weigand float 0xffffffffe0000000, float 0xffffffffc0000000> 171*80b3af7aSUlrich Weigand} 172*80b3af7aSUlrich Weigand 173*80b3af7aSUlrich Weigand; Repeat f14 with undefs optimistically treated as 0, 32767. 174*80b3af7aSUlrich Weiganddefine <4 x float> @f19() { 175*80b3af7aSUlrich Weigand; CHECK-LABEL: f19: 176*80b3af7aSUlrich Weigand; CHECK: vrepig %v24, 32767 177*80b3af7aSUlrich Weigand; CHECK: br %r14 178*80b3af7aSUlrich Weigand ret <4 x float> <float undef, float undef, 179*80b3af7aSUlrich Weigand float 0.0, float 0x378fffc000000000> 180*80b3af7aSUlrich Weigand} 181*80b3af7aSUlrich Weigand 182*80b3af7aSUlrich Weigand; Repeat f18 with undefs optimistically treated as -2, -1. 183*80b3af7aSUlrich Weiganddefine <4 x float> @f20() { 184*80b3af7aSUlrich Weigand; CHECK-LABEL: f20: 185*80b3af7aSUlrich Weigand; CHECK: vrepig %v24, -2 186*80b3af7aSUlrich Weigand; CHECK: br %r14 187*80b3af7aSUlrich Weigand ret <4 x float> <float 0xffffffffe0000000, float undef, 188*80b3af7aSUlrich Weigand float undef, float 0xffffffffc0000000> 189*80b3af7aSUlrich Weigand} 190