1 ; Test that vector sexts are done efficently with unpack instructions also in
2 ; case of fewer elements than allowed, e.g. <2 x i32>.
4 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s
7 define <2 x i16> @fun1(<2 x i8> %val1) {
9 ; CHECK: vuphb %v24, %v24
11 %z = sext <2 x i8> %val1 to <2 x i16>
15 define <2 x i32> @fun2(<2 x i8> %val1) {
17 ; CHECK: vuphb %v0, %v24
18 ; CHECK-NEXT: vuphh %v24, %v0
20 %z = sext <2 x i8> %val1 to <2 x i32>
24 define <2 x i64> @fun3(<2 x i8> %val1) {
26 ; CHECK: vuphb %v0, %v24
27 ; CHECK-NEXT: vuphh %v0, %v0
28 ; CHECK-NEXT: vuphf %v24, %v0
30 %z = sext <2 x i8> %val1 to <2 x i64>
34 define <2 x i32> @fun4(<2 x i16> %val1) {
36 ; CHECK: vuphh %v24, %v24
38 %z = sext <2 x i16> %val1 to <2 x i32>
42 define <2 x i64> @fun5(<2 x i16> %val1) {
44 ; CHECK: vuphh %v0, %v24
45 ; CHECK-NEXT: vuphf %v24, %v0
47 %z = sext <2 x i16> %val1 to <2 x i64>
51 define <2 x i64> @fun6(<2 x i32> %val1) {
53 ; CHECK: vuphf %v24, %v24
55 %z = sext <2 x i32> %val1 to <2 x i64>
59 define <4 x i16> @fun7(<4 x i8> %val1) {
61 ; CHECK: vuphb %v24, %v24
63 %z = sext <4 x i8> %val1 to <4 x i16>
67 define <4 x i32> @fun8(<4 x i8> %val1) {
69 ; CHECK: vuphb %v0, %v24
70 ; CHECK-NEXT: vuphh %v24, %v0
72 %z = sext <4 x i8> %val1 to <4 x i32>
76 define <4 x i32> @fun9(<4 x i16> %val1) {
78 ; CHECK: vuphh %v24, %v24
80 %z = sext <4 x i16> %val1 to <4 x i32>
84 define <8 x i16> @fun10(<8 x i8> %val1) {
86 ; CHECK: vuphb %v24, %v24
88 %z = sext <8 x i8> %val1 to <8 x i16>