1 ; Test that DAGCombiner gets helped by ComputeNumSignBitsForTargetNode() with
4 ; RUN: llc -mtriple=s390x-linux-gnu -mcpu=z13 < %s | FileCheck %s
6 declare <8 x i16> @llvm.s390.vuphb(<16 x i8>)
9 define <8 x i16> @f0() {
11 ; CHECK-LABEL: # %bb.0:
12 ; CHECK: vuphb %v24, %v0
14 %unp = call <8 x i16> @llvm.s390.vuphb(<16 x i8>
15 <i8 0, i8 1, i8 0, i8 1, i8 0, i8 1, i8 0, i8 1,
16 i8 0, i8 1, i8 0, i8 1, i8 0, i8 1, i8 0, i8 1>)
17 %trunc = trunc <8 x i16> %unp to <8 x i8>
18 %ret = sext <8 x i8> %trunc to <8 x i16>
22 declare <4 x i32> @llvm.s390.vuphh(<8 x i16>)
25 define <4 x i32> @f1() {
27 ; CHECK-LABEL: # %bb.0:
28 ; CHECK: vuphh %v24, %v0
30 %unp = call <4 x i32> @llvm.s390.vuphh(<8 x i16>
31 <i16 0, i16 1, i16 0, i16 1,
32 i16 0, i16 1, i16 0, i16 1>)
33 %trunc = trunc <4 x i32> %unp to <4 x i16>
34 %ret = sext <4 x i16> %trunc to <4 x i32>
38 declare <2 x i64> @llvm.s390.vuphf(<4 x i32>)
41 define <2 x i64> @f2() {
43 ; CHECK-LABEL: # %bb.0:
44 ; CHECK: vuphf %v24, %v0
46 %unp = call <2 x i64> @llvm.s390.vuphf(<4 x i32> <i32 0, i32 1, i32 0, i32 1>)
47 %trunc = trunc <2 x i64> %unp to <2 x i32>
48 %ret = sext <2 x i32> %trunc to <2 x i64>
52 declare <8 x i16> @llvm.s390.vuplb(<16 x i8>)
55 define <8 x i16> @f3() {
57 ; CHECK-LABEL: # %bb.0:
58 ; CHECK: vuplb %v24, %v0
60 %unp = call <8 x i16> @llvm.s390.vuplb(<16 x i8>
61 <i8 0, i8 1, i8 0, i8 1, i8 0, i8 1, i8 0, i8 1,
62 i8 0, i8 1, i8 0, i8 1, i8 0, i8 1, i8 0, i8 1>)
63 %trunc = trunc <8 x i16> %unp to <8 x i8>
64 %ret = sext <8 x i8> %trunc to <8 x i16>
68 declare <4 x i32> @llvm.s390.vuplhw(<8 x i16>)
71 define <4 x i32> @f4() {
73 ; CHECK-LABEL: # %bb.0:
74 ; CHECK: vuplhw %v24, %v0
76 %unp = call <4 x i32> @llvm.s390.vuplhw(<8 x i16>
77 <i16 1, i16 0, i16 1, i16 0,
78 i16 1, i16 0, i16 1, i16 0>)
79 %trunc = trunc <4 x i32> %unp to <4 x i16>
80 %ret = sext <4 x i16> %trunc to <4 x i32>
84 declare <2 x i64> @llvm.s390.vuplf(<4 x i32>)
87 define <2 x i64> @f5() {
89 ; CHECK-LABEL: # %bb.0:
90 ; CHECK: vuplf %v24, %v0
92 %unp = call <2 x i64> @llvm.s390.vuplf(<4 x i32> <i32 1, i32 0, i32 1, i32 0>)
93 %trunc = trunc <2 x i64> %unp to <2 x i32>
94 %ret = sext <2 x i32> %trunc to <2 x i64>