brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 55f3cdd Raw
64 lines · plain
1; Test vector byte masks, v4f32 version.2;3; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s4 5; Test an all-zeros vector.6define <4 x float> @f1() {7; CHECK-LABEL: f1:8; CHECK: vgbm %v24, 09; CHECK: br %r1410  ret <4 x float> zeroinitializer11}12 13; Test an all-ones vector.14define <4 x float> @f2() {15; CHECK-LABEL: f2:16; CHECK: vgbm %v24, 6553517; CHECK: br %r1418  ret <4 x float> <float 0xffffffffe0000000, float 0xffffffffe0000000,19                   float 0xffffffffe0000000, float 0xffffffffe0000000>20}21 22; Test a mixed vector (mask 0xc731).23define <4 x float> @f3() {24; CHECK-LABEL: f3:25; CHECK: vgbm %v24, 5099326; CHECK: br %r1427  ret <4 x float> <float 0xffffe00000000000, float 0x381fffffe0000000,28                   float 0x379fffe000000000, float 0x371fe00000000000>29}30 31; Test that undefs are treated as zero (mask 0xc031).32define <4 x float> @f4() {33; CHECK-LABEL: f4:34; CHECK: vgbm %v24, 4920135; CHECK: br %r1436  ret <4 x float> <float 0xffffe00000000000, float undef,37                   float 0x379fffe000000000, float 0x371fe00000000000>38}39 40; Test that we don't use VGBM if one of the bytes is not 0 or 0xff.41define <4 x float> @f5() {42; CHECK-LABEL: f5:43; CHECK-NOT: vgbm44; CHECK: br %r1445  ret <4 x float> <float 0xffffe00000000000, float 0x381fffffc0000000,46                   float 0x379fffe000000000, float 0x371fe00000000000>47}48 49; Test an all-zeros v2f32 that gets promoted to v4f32.50define <2 x float> @f6() {51; CHECK-LABEL: f6:52; CHECK: vgbm %v24, 053; CHECK: br %r1454  ret <2 x float> zeroinitializer55}56 57; Test a mixed v2f32 that gets promoted to v4f32 (mask 0xc700).58define <2 x float> @f7() {59; CHECK-LABEL: f7:60; CHECK: vgbm %v24, 5094461; CHECK: br %r1462  ret <2 x float> <float 0xffffe00000000000, float 0x381fffffe0000000>63}64