brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.0 KiB · 0c69b88 Raw
190 lines · plain
1; Test vector replicates, v4f32 version.2;3; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s4 5; Test a byte-granularity replicate with the lowest useful value.6define <4 x float> @f1() {7; CHECK-LABEL: f1:8; CHECK: vrepib %v24, 19; CHECK: br %r1410  ret <4 x float> <float 0x3820202020000000, float 0x3820202020000000,11                   float 0x3820202020000000, float 0x3820202020000000>12}13 14; Test a byte-granularity replicate with an arbitrary value.15define <4 x float> @f2() {16; CHECK-LABEL: f2:17; CHECK: vrepib %v24, -5518; CHECK: br %r1419  ret <4 x float> <float 0xc139393920000000, float 0xc139393920000000,20                   float 0xc139393920000000, float 0xc139393920000000>21}22 23; Test a byte-granularity replicate with the highest useful value.24define <4 x float> @f3() {25; CHECK-LABEL: f3:26; CHECK: vrepib %v24, -227; CHECK: br %r1428  ret <4 x float> <float 0xc7dfdfdfc0000000, float 0xc7dfdfdfc0000000,29                   float 0xc7dfdfdfc0000000, float 0xc7dfdfdfc0000000>30}31 32; Test a halfword-granularity replicate with the lowest useful value.33define <4 x float> @f4() {34; CHECK-LABEL: f4:35; CHECK: vrepih %v24, 136; CHECK: br %r1437  ret <4 x float> <float 0x37a0001000000000, float 0x37a0001000000000,38                   float 0x37a0001000000000, float 0x37a0001000000000>39}40 41; Test a halfword-granularity replicate with an arbitrary value.42define <4 x float> @f5() {43; CHECK-LABEL: f5:44; CHECK: vrepih %v24, 2565045; CHECK: br %r1446  ret <4 x float> <float 0x44864c8640000000, float 0x44864c8640000000,47                   float 0x44864c8640000000, float 0x44864c8640000000>48}49 50; Test a halfword-granularity replicate with the highest useful value.51define <4 x float> @f6() {52; CHECK-LABEL: f6:53; CHECK: vrepih %v24, -254; CHECK: br %r1455  ret <4 x float> <float 0xffffdfffc0000000, float 0xffffdfffc0000000,56                   float 0xffffdfffc0000000, float 0xffffdfffc0000000>57}58 59; Test a word-granularity replicate with the lowest useful positive value.60define <4 x float> @f7() {61; CHECK-LABEL: f7:62; CHECK: vrepif %v24, 163; CHECK: br %r1464  ret <4 x float> <float 0x36a0000000000000, float 0x36a0000000000000,65                   float 0x36a0000000000000, float 0x36a0000000000000>66}67 68; Test a word-granularity replicate with the highest in-range value.69define <4 x float> @f8() {70; CHECK-LABEL: f8:71; CHECK: vrepif %v24, 3276772; CHECK: br %r1473  ret <4 x float> <float 0x378fffc000000000, float 0x378fffc000000000,74                   float 0x378fffc000000000, float 0x378fffc000000000>75}76 77; Test a word-granularity replicate with the next highest value.78; This cannot use VREPIF.79define <4 x float> @f9() {80; CHECK-LABEL: f9:81; CHECK-NOT: vrepif82; CHECK: br %r1483  ret <4 x float> <float 0x3790000000000000, float 0x3790000000000000,84                   float 0x3790000000000000, float 0x3790000000000000>85}86 87; Test a word-granularity replicate with the lowest in-range value.88define <4 x float> @f10() {89; CHECK-LABEL: f10:90; CHECK: vrepif %v24, -3276891; CHECK: br %r1492  ret <4 x float> <float 0xfffff00000000000, float 0xfffff00000000000,93                   float 0xfffff00000000000, float 0xfffff00000000000>94}95 96; Test a word-granularity replicate with the next lowest value.97; This cannot use VREPIF.98define <4 x float> @f11() {99; CHECK-LABEL: f11:100; CHECK-NOT: vrepif101; CHECK: br %r14102  ret <4 x float> <float 0xffffefffe0000000, float 0xffffefffe0000000,103                   float 0xffffefffe0000000, float 0xffffefffe0000000>104}105 106; Test a word-granularity replicate with the highest useful negative value.107define <4 x float> @f12() {108; CHECK-LABEL: f12:109; CHECK: vrepif %v24, -2110; CHECK: br %r14111  ret <4 x float> <float 0xffffffffc0000000, float 0xffffffffc0000000,112                   float 0xffffffffc0000000, float 0xffffffffc0000000>113}114 115; Test a doubleword-granularity replicate with the lowest useful positive116; value.117define <4 x float> @f13() {118; CHECK-LABEL: f13:119; CHECK: vrepig %v24, 1120; CHECK: br %r14121  ret <4 x float> <float 0.0, float 0x36a0000000000000,122                   float 0.0, float 0x36a0000000000000>123}124 125; Test a doubleword-granularity replicate with the highest in-range value.126define <4 x float> @f14() {127; CHECK-LABEL: f14:128; CHECK: vrepig %v24, 32767129; CHECK: br %r14130  ret <4 x float> <float 0.0, float 0x378fffc000000000,131                   float 0.0, float 0x378fffc000000000>132}133 134; Test a doubleword-granularity replicate with the next highest value.135; This cannot use VREPIG.136define <4 x float> @f15() {137; CHECK-LABEL: f15:138; CHECK-NOT: vrepig139; CHECK: br %r14140  ret <4 x float> <float 0.0, float 0x3790000000000000,141                   float 0.0, float 0x3790000000000000>142}143 144; Test a doubleword-granularity replicate with the lowest in-range value.145define <4 x float> @f16() {146; CHECK-LABEL: f16:147; CHECK: vrepig %v24, -32768148; CHECK: br %r14149  ret <4 x float> <float 0xffffffffe0000000, float 0xfffff00000000000,150                   float 0xffffffffe0000000, float 0xfffff00000000000>151}152 153; Test a doubleword-granularity replicate with the next lowest value.154; This cannot use VREPIG.155define <4 x float> @f17() {156; CHECK-LABEL: f17:157; CHECK-NOT: vrepig158; CHECK: br %r14159  ret <4 x float> <float 0xffffffffe0000000, float 0xffffefffe0000000,160                   float 0xffffffffe0000000, float 0xffffefffe0000000>161}162 163; Test a doubleword-granularity replicate with the highest useful negative164; value.165define <4 x float> @f18() {166; CHECK-LABEL: f18:167; CHECK: vrepig %v24, -2168; CHECK: br %r14169  ret <4 x float> <float 0xffffffffe0000000, float 0xffffffffc0000000,170                   float 0xffffffffe0000000, float 0xffffffffc0000000>171}172 173; Repeat f14 with undefs optimistically treated as 0, 32767.174define <4 x float> @f19() {175; CHECK-LABEL: f19:176; CHECK: vrepig %v24, 32767177; CHECK: br %r14178  ret <4 x float> <float undef, float undef,179                   float 0.0, float 0x378fffc000000000>180}181 182; Repeat f18 with undefs optimistically treated as -2, -1.183define <4 x float> @f20() {184; CHECK-LABEL: f20:185; CHECK: vrepig %v24, -2186; CHECK: br %r14187  ret <4 x float> <float 0xffffffffe0000000, float undef,188                   float undef, float 0xffffffffc0000000>189}190